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
{{ message }}
Repository navigation
getPythonEnvironmentInfo tool fails for venv created with uv #25463
If you have uv installed it should be print into the logs something like this: Running: uv pip list --python /Users/eleanorboyd/vscode-python/.venv-2/bin/python.
Can you check in your logs (for the python environment extension) and see if you see if you see it attempting a different command instead? Seems like it might not be recognizing that you have uv installed.
Following is the information about the Python environment:
1. Environment Type: unknown
2. Version: 3.13.5.final.0
3. Command Prefix to run Python in a terminal is: `/bin/python`
Instead of running `Python sample.py` in the terminal, you will now run: `/bin/python sample.py`
Similarly instead of running `Python -c "import sys;...."` in the terminal, you will now run: `/bin/python -c "import sys;...."`4. Below is a list of the Python packages, each in the format <name> or <name> (<version>). The version may be omitted if unknown:
- annotated-types (0.7.0)
…
- zstandard (0.25.0)
Which is not what I reported. But something seems off nonetheless, the Python path is wrong.
When I then ask for a package to be installed into .venv, even if I insist to target .venv, it seems to target a global installation path or something in the tool call title (it does mention .venv). The parameters do seem correct:
Activity
moneytoyoung commentedon Sep 14, 2025
Have you override the codes .to your own codes just a question. Sometimes it is ok to use older codes and alter them!!.to the point
eleanorjboyd commentedon Sep 16, 2025
hm it should use
uv pipfor install - let me investigate. Thanks!eleanorjboyd commentedon Sep 16, 2025
If you have
uvinstalled it should be print into the logs something like this:Running: uv pip list --python /Users/eleanorboyd/vscode-python/.venv-2/bin/python.Can you check in your logs (for the python environment extension) and see if you see if you see it attempting a different command instead? Seems like it might not be recognizing that you have
uvinstalled.moneytoyoung commentedon Sep 16, 2025
Gallaecio commentedon Sep 18, 2025
I have just tested creating an empty folder, running
uv venvinside, and then asking the chat to rungetPythonEnvironmentInfofor.venv.Input:
{ "resourcePath": "/home/adrian/temporal/uv-test/.venv" }Output:
Which is not what I reported. But something seems off nonetheless, the Python path is wrong.
When I then ask for a package to be installed into
.venv, even if I insist to target.venv, it seems to target a global installation path or something in the tool call title (it does mention.venv). The parameters do seem correct:{ "packageList": [ "scrapy" ], "resourcePath": "/home/adrian/temporal/uv-test/.venv" }Output:
Yet:
This does seem like a different issue from the one I reported originally, though. Shall I close this ticket and open a separate one?
eleanorjboyd commentedon Dec 12, 2025
Hi! Can you retry this now- we added a setting
alwaysUseUvwhich defaults totrueand should help but I am not sure for this specific scenarioGallaecio commentedon Dec 15, 2025
With 2025.20.0, if I first create a venv with
uv venvand then ask the chat to run this tool, I get:Which is, funny enough, the original issue, which I could not reproduce the last time.
I did confirm that
alwaysUseUvis in settings and is enabled.