Skip to content

/ is mistaken for prefix of local installation #9818

@konstin

Description

@konstin

On my ubuntu 24.04, i have the system default python 3.12 installed (sudo apt install python3.12). This installation comes with a /lib/python3.12/os.py, and also the uv test pythons (uv python install in the project root). This can break the uv test suite: The test python 3.12 is in /home/konsti/.local/share/uv/tests/.tmpyikuSY/python/3.12/python3, which we mistake as a base python, because / fulfills is_prefix in find_base_python. Since this is not the correct home for that python, tests trying to run it fail with the wrong PYTHONHOME error (ModuleNotFoundError: No module named 'encodings').

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