Skip to content

python.condaPath not considered when calling conda #9154

@sbmueller

Description

@sbmueller

Environment data

  • VS Code version: 1.41.0
  • Extension version (available under the Extensions sidebar): 2019.11.50794
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): Anaconda 3 (Python 3.6)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Relevant/affected Python packages and their versions: XXX
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version #3977): Jedi

Expected behaviour

When setting python.condaPath to the conda executable, e.g. C:/Programs/anaconda/Scripts/conda.exe, the activate command should be used with this executable if a python file is run.

Actual behaviour

conda command is run instead. Since conda is not in my PATH, I get an error that the command is not recognized.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Path\Stuff> conda activate test
conda : The term 'conda' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Set up Anaconda environment
  2. Make sure VS Code recognized environment (Python 3.xxx ('name': conda) in status bar)
  3. Make sure python.terminal.activateEnvironment is True
  4. Run a python file

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

XXX

Metadata

Metadata

Assignees

Labels

area-environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions