Skip to content

Python not found in Conda environment #381

Open
@wohenbushuang

Description

@wohenbushuang

Hi.
I use conda to manage my Python environments. When I installed the extension, the launch of the extension in my workspace failed. Here is the output of the extension.

2025-05-04 15:00:10.598 [info] Experiment 'pythonRecommendTensorboardExt' is active
2025-05-04 15:00:10.598 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2025-05-04 15:00:10.598 [info] > pyenv which python
2025-05-04 15:00:10.598 [info] cwd: .
2025-05-04 15:00:11.904 [info] EnvExt: Python not found in Conda environment d:\ProgramData\miniconda3\python.exe
2025-05-04 15:00:11.904 [info] EnvExt: Installing Python in Conda environment d:\ProgramData\miniconda3\python.exe
2025-05-04 15:00:12.518 [info] Starting Pylance language server.
2025-05-04 15:00:12.521 [info] > d:\ProgramData\miniconda3\python.exe -c "import sys;print(sys.executable)"

Settings python-envs.defaultEnvManager and python-envs.defaultPackageManager in the workspace have been changed to ms-python.python:conda automatically by the extension.

When open the integrated terminal, it will be forced to use the first alphabetical ordered named env, and it shows

<workspace>/>D:\ProgramData\miniconda3\Scripts\conda.EXE activate <env>

CondaError: Run 'conda init' before 'conda activate'

which should work in system terminal or I disable this extension.


My vscode environment:

Version: 1.99.3 (user setup)
Commit: 17baf841131aa23349f217ca7c570c76ee87b957
Date: 2025-04-15T23:18:46.076Z
Electron: 34.3.2
ElectronBuildId: 11161073
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.19045

with this extension v0.3.10991008 and python extension v2025.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions