Skip to content

venv module does not work on when invoked via a symlink to a uv-installed Python #12173

Open
@pganssle

Description

@pganssle

Summary

If I do the following:

tmpdir=$(mktemp -d)
cd $tmpdir
uv python install 3.13.2  # Version doesn't matter here
ln -s ~/.local/share/uv/python/cpython-3.13.2-linux-x86_64-gnu/bin/python3.13 python
./python -m venv venv

The command fails with:

Error: Command '['/tmp/tmp.ATu00koNaI/venv/bin/python', '-m', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

Invoking the python interpreter by its full path works just fine.

Doing the same thing with a pyenv-installed Python works as well, so this seems to be uv-specific.

Possbly releated is #8879. The title of this issue seems similar, but the reproducer makes it seem like it's something else, and it breaks in a different way.

Platform

Linux

Version

0.5.29

Python version

3.13.2

Metadata

Metadata

Assignees

No one assigned

    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