-
Notifications
You must be signed in to change notification settings - Fork 808
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
Windows: uv doesn't find python versions on PATH #1310
Comments
Nice, good find. |
The issue is probably more general and applies to all python versions that are on the PATH. See this comment |
Ran into this on Github Actions too, see https://github.com/tox-dev/tox-uv/actions/runs/7935511069?pr=2 |
Yep, uv seems to expect the global ❯ uv venv
× Failed to run `py --list-paths` to find Python installations. Is Python installed?
╰─▶ program not found I tried all installation methods (cargo, pip, from source) |
@melMass is |
Maybe the Specifying the path like this works fine: uv venv -p (pyenv exec python -c "import sys; print(sys.executable)") |
It looks like Or, yes, you can use the full path to the interpreter executable directly |
Thanks, it makes sense.
In this case I think I'll use the cargo releases to avoid |
I plan to work on this on Monday except someone beats me to it. Appreciate any pointers. |
@zanieb any idea why GitHub actions fails? |
Hm this looks to be working in GitHub actions with |
#1521 should not be the next step. I know that is a spec and I know that virtualenv supports that, but I guarantee you that it is generally unused in most scenarios and you should prioritize implementing lookups based on PATH. The way virtualenv works is that it will try the registry and if the result is not empty then use PATH but in all of my time in enterprise and on my personal machine it has always responded to modifications to PATH. |
@ofek can you please clarify what you'd like us to find on the PATH? We already will find |
When called from within tox tox-dev/tox-uv#19 seems it fails though.... |
@zanieb can you help what information exactly is used on Windows to create the environment today? Env-vars, and such 😊 |
@zanieb Yes I understand that but the issue is that you're not finding every single |
This seems unrelated to the Python discovery because |
According to pep514,
Virtualenv has a fallback where it iterates over each path and tries to find the right python version https://github.com/pypa/virtualenv/blob/fa283474fd199e3836f8b2c99510190c6b77e2bc/src/virtualenv/discovery/builtin.py#L107-L120 |
I installed Python using pyenv-win but puffin can't find it (because it's not in the PATH). Running python from the command line works as expected and starship recognises it correctly too.
Probably related to #1168
Work around: use
pyenv which python
and pass the path explicitlypuffin pip -p <path_shown_by_pyenv_which>
The text was updated successfully, but these errors were encountered: