-
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
Python env resolver ignores user specified interpreter #24767
Comments
@dta-bdai Can you share the logs with the broken case? share the Output > Python, and Output> Python Locator logs. The work around is to use |
Thanks! Confirmed that Here are the logs for the Output > Python:
Output > Python Locator:
The path I chose is |
Type: Bug
We have a wrapper around a Bazel generated script that launches the Python interpreter inside Bazel with all environment variables and Python paths setup properly, pointing to the correct locations of Python packages and dependencies inside Bazel runfiles dir. The technique is similar to this: https://sransara.com/notes/2023/bazel-python-venv/
We point VSCode Python interpreter to the wrapper script, and it used to work well.
Since version 2024.18.0, this workflow does not work anymore. Python extension ignores the wrapper we specified and automatically finds and switches to the bare python interpreter in the script runfiles dir, which doesn't have any path setup.
Is there a way to revive the old mechanism, i.e. forcing VSCode to respect the user-specified Python interpreter path?
Extension version: 2024.22.2
VS Code version: Code 1.96.2 (fabdb6a30b49f79a7aba0f2ad9df9b399473380f, 2024-12-19T10:22:47.216Z)
OS version: Linux x64 6.8.0-51-generic
Modes:
Remote OS version: Linux x64 6.8.0-1017-gcp
python.languageServer
setting: PylanceUser 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: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: