Skip to content

conda activate conda-environment not working on windows #8437

@mfittere

Description

@mfittere

Environment data

  • VS Code version: 1.39.2
  • Extension version (available under the Extensions sidebar): XXX
  • OS and version: Windows 10 Enterprise 1809
  • Python version (& distribution if applicable, e.g. Anaconda): conda 4.7.12
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda 4.7.12
  • Relevant/affected Python packages and their versions: None
  • 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): XXX

Expected behaviour

In bash shell:
conda activate PIMSmyApp

-> activates environment PIMSmyApp

This does not work even after running (as advised in the error message)

conda init bash

Actual behaviour

conda activate base

generates the following error message:

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If using 'conda activate' from a batch script, change your
invocation to 'CALL conda.bat activate'.

To initialize your shell, run

    $ conda init <SHELL_NAME>

Currently supported shells are:
  - bash
  - cmd.exe
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.

Steps to reproduce:

  1. conda activate base

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

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions