Conda activation does not work in Terminal
See original GitHub issueEnvironment data
- VS Code version: Stable/Insiders
- Extension version (available under the Extensions sidebar): N/A
- OS and version: Mac
- Python version (& distribution if applicable, e.g. Anaconda): Anaconda 4.6
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): Conda
- Relevant/affected Python packages and their versions: N/A
Expected behaviour
When a conda environment activated using conda activate xxx
, then using python xxx
will point to the activated environment.
Actual behaviour
Even though a conda environment has been activated, which python
will point to the wrong environment.
Steps to reproduce:
- Open terminal (without python extenions)
- Run command
conda activate xxx
- Run command
which python
Tracked here https://github.com/microsoft/vscode-python/issues/5344 Upstream issue https://github.com/microsoft/vscode/issues/70248
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:11 (3 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
checking off the ‘inherit Env’ in settings solved this issue on my mac
Prescribed solution
Cool, so if it isn’t a Windows machine and if the selected interpreter is a conda environment and “terminal.integrated.inheritEnv” is not set on the user’s user settings, we can prompt the message below:
“We noticed you’re using a conda environment. If you are experiencing issues with this environment in the integrated terminal, we suggest the “terminal.integrated.inheritEnv” setting to be changed to false. Would you like to update this setting?” Options: Yes, No
And add telemetry for the yes selection, so we can know if this is actually solving the issue.