-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
native locator does not resolve conda environments in homebrew-installed miniforge #23968
Comments
This seems to be an issue faced by very many people, which is confirmed by the high number of views of the stackoverflow question I created: https://stackoverflow.com/a/78886126/7483211 TL;DR: Add this to your user settings: "python.locator": "js", |
Not completely sure this is the same issue as the ones you linked. Certainly looks similar, but in my case the python extension starts up fine (e.g. syntax highlighting works). I can even use the global brew python. Just activating any of the conda environments fails. Of course it could still be the same issue and the difference in behavior is caused by other aspects of my configuration. In any case, switching to the |
Thanks, that's helpful context! Might be one root cause with different symptoms/manifestations depending on the venvs/conda/pixi/poetry environments one has present. |
@rzeidler @austinmw @corneliusroemer Please can you try installing the pre-release version and checking if that works. If this doesn't work, please try the following:
I have tested this at my end and it works for me. |
This comment has been minimized.
This comment has been minimized.
Thanks @DonJayamanne - I confirm the problem is fixed for me, even when changing the locator back to native. (I always use pre-release: |
Thank you @DonJayamanne - I can also confirm that this is fixed in the pre-release version. |
Thanks @DonJayamanne – for me it also seems to be fixed in the pre-release version. |
Closing as fixed |
The issue has unfortunately come back in the newer prerelease version See #23982 - the |
Type: Bug
Behaviour
The native python locator does not correctly resolve my conda environments from a miniforge installation on MacOS, where miniforge itself was installed via homebrew. The issue occurs on two separate computers, I only discovered the problem because on the newer installation the python extension was set to use the new
native
locator by default. When using the oldjs
locator everything works as expected.After trying to select my environment in an interactive python window, the displayed python version in the GUI becomes "Python -1.-1.-1" and an error is reported that the kernel could not be started because the python environment is not available any more.
Steps to reproduce:
brew install miniforge
.mamba create -n test_environ python=3.11
Judging from the log files, it seems that after these steps, the new locator tries to run
/opt/homebrew/bin/python
(which does not even exist!), rather than the correct/opt/homebrew/Caskroom/miniforge/base/envs/test_environ/bin/python3.11
.Diagnostic data
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Python.log
Python Locator.log
Extension version: 2024.12.3
VS Code version: Code 1.92.2 (Universal) (fee1edb8d6d72a0ddff41e5f71a671c23ed924b9, 2024-08-14T17:29:30.058Z)
OS version: Darwin arm64 23.6.0
Modes:
python.languageServer
setting: DefaultUser Settings
Installed Extensions
System Info
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
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: