News for hackers. Stuff that matters.
Re:uv: An extremely fast Python package and project manager,... by zbentley on Monday June 23, 2025 @06:35PM (#44360892)
Two options other than aliases:

1. Modify your PATH:

    export PATH="$(uv run python -BISc 'import sys; print(sys.base_exec_prefix)')/bin:$PATH"
2. Put this in an executable file called "python" early in your PATH:

    #!/bin/sh
    exec uv run python $*
Those are basically what pyenv does (via a symlink and PATH entry).

The second option will always pick up the Python local to the project directory you're in, if any. The former (if you put it in your shell profile) will not.

There are no comments on this comment yet.