Skip to content

uv --python and uv python pin fail if Python3.6 is found on the system #10898

Closed
@jramcast

Description

@jramcast

Summary

I have Python 3.10 installed at /usr/local/bin/python
Python3.6 is also available at /usr/bin/python3

Expected behavior: uv ignores the 3.6 installation.

Actuall behavior. When I try to run a command by using a specific python version, the command fails

uv -v run --python 3.9 python --version
DEBUG uv 0.5.23
DEBUG No project found; searching for Python interpreter
DEBUG Searching for Python 3.9 in virtual environments, managed installations, or search path
DEBUG Searching for managed installations at `.local/share/uv/python`
DEBUG Found `cpython-3.10.4-linux-x86_64-gnu` at `/usr/local/bin/python3` (search path)
DEBUG Skipping interpreter at `/usr/local/bin/python3` from search path: does not satisfy request `3.9`
DEBUG Found `cpython-3.10.4-linux-x86_64-gnu` at `/usr/local/bin/python` (search path)
DEBUG Skipping interpreter at `/usr/local/bin/python` from search path: does not satisfy request `3.9`
DEBUG Failed to inspect Python interpreter from search path at `/usr/bin/python3` 
DEBUG Skipping bad interpreter at /usr/bin/python3 from search path: Python 3.6.8 is not supported. Please use Python 3.8 or newer.
DEBUG Failed to inspect Python interpreter from search path at `/bin/python3` 
DEBUG Skipping bad interpreter at /bin/python3 from search path: Python 3.6.8 is not supported. Please use Python 3.8 or newer.
error: Failed to inspect Python interpreter from search path at `/usr/bin/python3`
  Caused by: Can't use Python at `/usr/bin/python3`
  Caused by: Python 3.6.8 is not supported. Please use Python 3.8 or newer.

Platform

Linux 6.12.5-200.fc41.x86_64 x86_64 GNU/Linux

Version

uv 0.5.23

Python version

Python 3.10.4

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions