[Python] How to install locally built package with uv

Discussão em 'Python' iniciado por Stack, Dezembro 1, 2025.

  1. Stack

    Stack Membro Participativo

    I am struggling a bit with uv mental model and compatibility with existing tool.

    I have a project with a "setup.py", previously using python -m build to run the build. I couldn't find a way to install "build" globally though, using uv pip install --system build will try to literally use system's Python but won't install the package at user level outside of a virtual env (build already creates a venv).

    Anway with uv a simple uv build seems to be sufficient. But then documentation only deals with publishing the package but here I am building a CLI.

    • uv pip install --system ./dist.tar.gz gives me an error

    error: The interpreter at /usr is externally managed, and indicates the following:

    To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    • uv pip install --user ./dist/foobar.tar.gz gives me:

    error: pip's `--user` is unsupported (use a virtual environment instead)


    How to install the built wheel or tar.gz files globally, on my own machine?

    Continue reading...

Compartilhe esta Página