conda environment activation not working in Python Terminal #18716
Labels
area-terminal
bug
Issue identified by VS Code Team member as probable bug
info-needed
Issue requires more information from poster
investigating
We are looking into the cause of the issue
We have written the neede
Issue Type: Bug
Behaviour
Expected vs. Actual
I am using conda environments in vscode on a mac (with apple silicon -- but that probably doesn't matter).
I set my python interpreter to the right conda environment, but in the Terminal that environment is not activated, instead the default system python continues to be used.
Steps to reproduce:
conda create --name test python=3.10
VSCode is executing the right conda command to activate the environment:
but somehow it messes up and the path still has the global python ahead of the conda env's python:
which python
to see that the system python is usedecho $PATH
to see that/usr/bin
is before/Users/danielsc/opt/miniconda3/envs/vnext/bin
or whatever your conda envs location isWhen running tests or a .py file, it seems to now be using
conda run
, so everything works fine there:Diagnostic data
python.languageServer
setting: DefaultUser Settings
Extension version: 2022.2.1924087327
VS Code version: Code 1.65.2 (Universal) (c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1, 2022-03-10T14:33:49.188Z)
OS version: Darwin arm64 21.3.0
Restricted Mode: No
System Info
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: