You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the issues with this extensions, I'd highly recommend disabling / not installing this by default.
Repo:
Install uv as your Python package manager
Open a monorepo with uv syncd subdirectory
See available VS Code environments from "Select a Python Environment"
Expected: Able to locate Python environment automatically Actual: Unable to locate uv Python environment
As workaround to above, I tried to enter my interpreter path directly in "Select a Python Environment"
Expected: Able to paste interpreter path into "Select a Python Environment" just like it works with this extension disabled/uninstalled Actual: Pasting paths doesn't work. Have to manually navigate through GUI to the correct path
Select appropriate uv python binary location
Expected: VS Code loads appropriate uv environment (eg ./backend/.venv/bin/python) Actual: VS Code now follows symlink and loads incorrect uv share environment path (eg /Users/justin/.local/share/uv/python/cpython-3.12.8-macos-aarch64-none/bin/python) and thus unable to locate necessary packages to run anything
Workaround:
Disable (or uninstall) Python Environments avoids all issues above:
Seems to find the uv interpreter automatically from appropriate subdirectory
Able if desired to copy/paste uv environment location directly into "Enter interpreter path..." (no need for manually navigate paths in GUI)
Seems to load uv venv fine in a simpler project setup with uv environment in the root directory using a different version of Python in the environment. Possibly one or more of the following is causing this:
Extension is unable to handle monorepos where Python uv environments are in sudirectories
Extension is unable to handle manually supplied uv environments in general (per repro step 4)
Extension is unable to deal with Python uv environments where the underlying Python version is shared by uv (eg it's incorrectly trying to resolve symlinks when it shouldn't)
Hello! Taking a closer look at this- could you try running Python: Run Python Environment Tool (PET) in Terminal...
from the command palette. Then select "resolve" and paste in ./backend/.venv/bin/python or the absolute path equivilent and let me know what it returns. Starting to work on this and need to make sure I know what it is resolving to with our PET tool. I think it will be the same as this problem: #541 but would appreciate the extra context as I investigate.
Per your other questions, I am making some changes to how workspace environments are discovered. For now you can right click on the parent folder of the .venv you are trying to get the extension to recognize and select "add as python project" this should make the venv findable after a window reload. Thanks!
I'm unblocked by disabling the extension (it is too problematic without utility for my needs). Below is the requested info with the extension temporarily enabled with a few minor redacted changes:
String replaced my expanded home directory with "~"
String replaced my project name with "REDACTED_PROJECT_NAME"
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.
The requested info was provided a month ago in my last reply and this issue blocks use of this extension with uv. This project permissions blocks me from directly re-opening issues, so please re-open this issue.
Hey! I ran into this a while ago and made microsoft/python-environment-tools#263 to get PET to recognize uv workspaces which I thought would address item 3 from the OP, but that's not the case. I think the extension side needs to change too to get the discovered environments into the environment picker - so I started looking at making an extension that would implement EnvironmentManager but I'm not sure the extension API exposes NativePythonFinder (IIUC that's the typescript representation of PET).
So I see three ways forward all with different tradeoffs:
Get some basic support for uv workspaces and environments merged into PET & this extension
Get basic support for uv workspaces and environments merged into PET, make access to the bundled PET available through this extension's API, and make a separate extension that would hook into these new APIs
Don't change PET, ship a separate extension that reimplements the workspace/env finding/resolving logic separately (ideally within uv itself)
Zsolt Dollenstein (@zsol) had implemented basic discovery so uv environments are recognized as such! Would love people's feedback here and I plan to make documentation updates to help clarify uv for the extension
Activity
justinerickson commentedon Jul 29, 2025
Seems to load uv venv fine in a simpler project setup with uv environment in the root directory using a different version of Python in the environment. Possibly one or more of the following is causing this:
eleanorjboyd commentedon Jul 30, 2025
Thank you for the detailed report- will investigate!
eleanorjboyd commentedon Aug 22, 2025
Hello! Taking a closer look at this- could you try running
Python: Run Python Environment Tool (PET) in Terminal...from the command palette. Then select "resolve" and paste in
./backend/.venv/bin/pythonor the absolute path equivilent and let me know what it returns. Starting to work on this and need to make sure I know what it is resolving to with our PET tool. I think it will be the same as this problem: #541 but would appreciate the extra context as I investigate.Per your other questions, I am making some changes to how workspace environments are discovered. For now you can right click on the parent folder of the .venv you are trying to get the extension to recognize and select "add as python project" this should make the venv findable after a window reload. Thanks!
justinerickson commentedon Aug 22, 2025
I'm unblocked by disabling the extension (it is too problematic without utility for my needs). Below is the requested info with the extension temporarily enabled with a few minor redacted changes:
github-actions commentedon Sep 6, 2025
Hey Eleanor Boyd (@eleanorjboyd), this issue might need further attention.
Justin Erickson (@justinerickson), you can help us out by closing this issue if the problem no longer exists, or adding more information.
github-actions commentedon Sep 20, 2025
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.
Happy Coding!
justinerickson commentedon Sep 20, 2025
The requested info was provided a month ago in my last reply and this issue blocks use of this extension with uv. This project permissions blocks me from directly re-opening issues, so please re-open this issue.
zsol commentedon Oct 11, 2025
Hey! I ran into this a while ago and made microsoft/python-environment-tools#263 to get PET to recognize uv workspaces which I thought would address item 3 from the OP, but that's not the case. I think the extension side needs to change too to get the discovered environments into the environment picker - so I started looking at making an extension that would implement
EnvironmentManagerbut I'm not sure the extension API exposesNativePythonFinder(IIUC that's the typescript representation of PET).So I see three ways forward all with different tradeoffs:
Any advice/thoughts?
eleanorjboyd commentedon Dec 17, 2025
Zsolt Dollenstein (@zsol) had implemented basic discovery so uv environments are recognized as such! Would love people's feedback here and I plan to make documentation updates to help clarify uv for the extension
eleanorjboyd commentedon Jan 13, 2026
closing as the implementation is shipped from Zsolt Dollenstein (@zsol). Please open a new issue if you have bugs or feedback. Thanks