Skip to content
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 preference option system disables python downloads #8804

Closed
Olindholm opened this issue Nov 4, 2024 · 1 comment · Fixed by #8808
Closed

Python preference option system disables python downloads #8804

Olindholm opened this issue Nov 4, 2024 · 1 comment · Fixed by #8808

Comments

@Olindholm
Copy link

I would like uv to prioritize using system python when possible, but download a managed python version if necessary.

I figure using the --python-preference system option (or export UV_PYTHON_PREFERENCE=system) would do this. However it seems when using that, downloads are disabled.

$ uv python list
cpython-3.13.0+freethreaded-linux-x86_64-gnu    <download available>
cpython-3.12.7-linux-x86_64-gnu                 <download available>
cpython-3.11.10-linux-x86_64-gnu                <download available>
cpython-3.10.15-linux-x86_64-gnu                <download available>
cpython-3.10.12-linux-x86_64-gnu                /usr/bin/python3.10
cpython-3.10.12-linux-x86_64-gnu                /usr/bin/python3 -> python3.10
cpython-3.10.12-linux-x86_64-gnu                /usr/bin/python -> python3
cpython-3.10.12-linux-x86_64-gnu                /bin/python3.10
cpython-3.10.12-linux-x86_64-gnu                /bin/python3 -> python3.10
cpython-3.10.12-linux-x86_64-gnu                /bin/python -> python3
cpython-3.9.20-linux-x86_64-gnu                 <download available>
cpython-3.8.20-linux-x86_64-gnu                 <download available>
cpython-3.7.9-linux-x86_64-gnu                  <download available>
pypy-3.10.14-linux-x86_64-gnu                   <download available>
pypy-3.9.19-linux-x86_64-gnu                    <download available>
pypy-3.8.16-linux-x86_64-gnu                    <download available>
pypy-3.7.13-linux-x86_64-gnu                    <download available>
$ uv venv --python 3.8 --python-preference system --verbose
DEBUG uv 0.4.29
DEBUG Searching for Python 3.8 in managed installations or system path
DEBUG Found `cpython-3.10.12-linux-x86_64-gnu` at `/usr/bin/python` (search path)
DEBUG Skipping interpreter at `/usr/bin/python` from search path: does not satisfy request `3.8`
DEBUG Found `cpython-3.10.12-linux-x86_64-gnu` at `/usr/bin/python3` (search path)
DEBUG Skipping interpreter at `/usr/bin/python3` from search path: does not satisfy request `3.8`
DEBUG Found `cpython-3.10.12-linux-x86_64-gnu` at `/bin/python` (search path)
DEBUG Skipping interpreter at `/bin/python` from search path: does not satisfy request `3.8`
DEBUG Found `cpython-3.10.12-linux-x86_64-gnu` at `/bin/python3` (search path)
DEBUG Skipping interpreter at `/bin/python3` from search path: does not satisfy request `3.8`
DEBUG Searching for managed installations at `/home/olindho1/.local/share/uv/python`
DEBUG Skipping incompatible managed installation `cpython-3.12.6-linux-x86_64-gnu`
  × No interpreter found for Python 3.8 in managed installations or system path

I don't see this behavior being described anywhere. Is this intentional or a bug?

@zanieb
Copy link
Member

zanieb commented Nov 4, 2024

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants