-
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
uv python list
fails if a pyenv-win install is included in the windows registry
#6524
Labels
bug
Something isn't working
help wanted
Contribution especially encouraged
uv python
Related to the uv python interface
windows
Specific to the Windows platform
Comments
uv python list
fails if a pyenv-win install is included in the windows registry
Thank you! |
konstin
added a commit
that referenced
this issue
Aug 28, 2024
Our current strategy of parsing the output of `py --list-paths` to get the installed python versions on windows is brittle (#6524, missing `py`, etc.) and it's slow (10ms last time i measured). Instead, we should behave spec-compliant and read the python versions from the registry following PEP 514. We're using the official rust-for-windows crates for accessing the registry. Fixes #1521 Fixes #6524
konstin
added a commit
that referenced
this issue
Aug 28, 2024
Our current strategy of parsing the output of `py --list-paths` to get the installed python versions on windows is brittle (#6524, missing `py`, etc.) and it's slow (10ms last time i measured). Instead, we should behave spec-compliant and read the python versions from the registry following PEP 514. We're using the official rust-for-windows crates for accessing the registry. Fixes #1521 Fixes #6524
konstin
added a commit
that referenced
this issue
Aug 28, 2024
Our current strategy of parsing the output of `py --list-paths` to get the installed python versions on windows is brittle (#6524, missing `py`, etc.) and it's slow (10ms last time i measured). Instead, we should behave spec-compliant and read the python versions from the registry following PEP 514. We're using the official rust-for-windows crates for accessing the registry. Fixes #1521 Fixes #6524
konstin
added a commit
that referenced
this issue
Aug 29, 2024
Our current strategy of parsing the output of `py --list-paths` to get the installed python versions on windows is brittle (#6524, missing `py`, etc.) and it's slow (10ms last time i measured). Instead, we should behave spec-compliant and read the python versions from the registry following PEP 514. It's not fully clear which errors we should ignore and which ones we need to raise. We're using the official rust-for-windows crates for accessing the registry. Fixes #1521 Fixes #6524
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
help wanted
Contribution especially encouraged
uv python
Related to the uv python interface
windows
Specific to the Windows platform
If a version of python is installed via pyenv with the
--register
flag then subsequentlyuv
will fail to list python installs as it attempts to query metadata of a file that does not exist.It looks like this is caused because
uv
makes the assumption thatpy --list-paths
will return paths with only<major>.<minor>
version information while pyenv installs are shown with<major>.<minor>.<micro>
1. The regex is then capturing the<micro>
part of the version as part of the path to the python executable.uv/crates/uv-python/src/py_launcher.rs
Lines 36 to 39 in bbcd10d
Commands:
Full output:
Example of
py --list-paths
output with multiple versions of python installed and registered with pyenv and some regular installs.2Footnotes
It looks like
py
is just using the key names to get the version rather than the value ofVersion
orSysVersion
in the registry. ↩This also lead to me finding out that pyenv-win registers 32bit python installs as 64bit which I've reported as a bug there. ↩
The text was updated successfully, but these errors were encountered: