Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anaconda environments listed as 'base' #23954

Closed
Flottrant opened this issue Aug 16, 2024 · 8 comments
Closed

Anaconda environments listed as 'base' #23954

Flottrant opened this issue Aug 16, 2024 · 8 comments
Assignees
Labels
area-environments Features relating to handling interpreter environments area-terminal bug Issue identified by VS Code Team member as probable bug

Comments

@Flottrant
Copy link

Type: Bug

Behaviour

Most of the conda environments in the automatic environment detection are listed as 'base' even though they show the correct path to the environment.
The VSCode terminal then only activates the actual conda base environment in the console.
Environments work correctly in independent terminals.

Steps to reproduce:

  1. Open VSCode
  2. Open command palette
  3. Run the command Python: Select Interpreter

Diagnostic data

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

XXX

Extension version: 2024.12.3
VS Code version: Code 1.92.2 (fee1edb8d6d72a0ddff41e5f71a671c23ed924b9, 2024-08-14T17:29:30.058Z)
OS version: Windows_NT x64 10.0.22631
Modes:

  • Python version (& distribution if applicable, e.g. Anaconda): 3.11.8
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
  • Value of the python.languageServer setting: Default
User Settings


languageServer: "Pylance"

testing
• unittestArgs: "<placeholder>"
• unittestEnabled: true

Installed Extensions
Extension Name Extension Id Version
autoDocstring - Python Docstring Generator njpwerner.autodocstring 0.6.1
Black Formatter ms-python.black-formatter 2024.3.12071014
Dev Containers ms-vscode-remote.remote-containers 0.381.0
Docker ms-azuretools.vscode-docker 1.29.2
Even Better TOML tamasfe.even-better-toml 0.19.2
Excel Viewer GrapeCity.gc-excelviewer 4.2.60
Git History donjayamanne.githistory 0.6.20
Git Project Manager felipecaputo.git-project-manager 1.8.2
GitHub Copilot GitHub.copilot 1.223.0
GitHub Copilot Chat GitHub.copilot-chat 0.18.2
GitHub Theme GitHub.github-vscode-theme 6.3.4
GitLens — Git supercharged eamodio.gitlens 15.3.0
H5Web h5web.vscode-h5web 0.1.6
JavaScript Debugger ms-vscode.js-debug 1.92.0
JavaScript Debugger Companion Extension ms-vscode.js-debug-companion 1.1.3
Jupyter ms-toolsai.jupyter 2024.7.0
Jupyter Cell Tags ms-toolsai.vscode-jupyter-cell-tags 0.1.9
Jupyter Keymap ms-toolsai.jupyter-keymap 1.1.2
Jupyter Notebook Renderers ms-toolsai.jupyter-renderers 1.0.19
Jupyter Slide Show ms-toolsai.vscode-jupyter-slideshow 0.1.6
markdownlint DavidAnson.vscode-markdownlint 0.55.0
Pylance ms-python.vscode-pylance 2024.8.101
Python ms-python.python 2024.12.3
Python Debugger ms-python.debugpy 2024.11.2024081401
Python Environment Manager donjayamanne.python-environment-manager 1.2.4
Remote - SSH ms-vscode-remote.remote-ssh 0.113.1
Remote - SSH: Editing Configuration Files ms-vscode-remote.remote-ssh-edit 0.86.0
Remote - Tunnels ms-vscode.remote-server 1.5.2
Remote Development ms-vscode-remote.vscode-remote-extensionpack 0.25.0
Remote Explorer ms-vscode.remote-explorer 0.4.3
Ruff charliermarsh.ruff 2024.40.0
Table Visualizer for JavaScript Profiles ms-vscode.vscode-js-profile-table 1.0.9
vscode-pdf tomoki1207.pdf 1.2.2
WSL ms-vscode-remote.remote-wsl 0.88.2
System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i7-12700H (20 x 2688)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.69GB (4.05GB free)
Process Argv --crash-reporter-id c259a226-0570-43d2-8380-de3aa8b15c8e
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
bdiig495:31013172
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
2f103344:31071589
impr_priority:31102340
refactort:31108082
pythonrstrctxt:31112756
wkspc-onlycs-c:31111717
nativeloc1:31118318
wkspc-ranged-c:31118571
pme_test_t:31118333

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Aug 16, 2024
@anthonykim1 anthonykim1 self-assigned this Aug 19, 2024
@anthonykim1 anthonykim1 added area-environments Features relating to handling interpreter environments area-terminal and removed triage-needed Needs assignment to the proper sub-team labels Aug 22, 2024
@anthonykim1
Copy link

Hello @Flottrant Thank you for filing this issue.
Are you able to add:

 "python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"],

in your settings.json and see if you can repro the same problem?

@Flottrant
Copy link
Author

Flottrant commented Aug 23, 2024

Hello @anthonykim1,
the issue seems to have disapeared completely after switching to version 2024.10.0 and back.
However, the same was not true for any version newer than 2024.10.0.

@anthonykim1
Copy link

@Flottrant Hello, when you search your setting and search 'native locator', is that set to native or js?

@Flottrant
Copy link
Author

It is set to js

@Flottrant
Copy link
Author

Setting it to native reproduced the issue.
This was with the "python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"] line added to the settings.json.

@agm-eratosth
Copy link

agm-eratosth commented Sep 26, 2024

Hi,

I'm having the same issue with the latest versions of vscode and this extension. It seems like a regression. I have set to native and js and get the same results for both (although not sure if one time choice of native causes this issue to persist).

Please look into the issue of all anaconda environments being called "base", thank you!

@anthonykim1
Copy link

@karthiknadig I think you would have better context of how conda environments get differentiated in the select interpreter listing.

@anthonykim1 anthonykim1 added the bug Issue identified by VS Code Team member as probable bug label Dec 9, 2024
@karthiknadig
Copy link
Member

We did a bunch of fixes for this recently so this should be addressed, if that is not the case please file a new bug with the logs from Output > Python locator, and screen shot of the interpreters list where envs are incorrectly marked as base

@karthiknadig karthiknadig closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-environments Features relating to handling interpreter environments area-terminal bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

4 participants