0

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?

1 Answer 1

0

Found answer to my own question: CLI are considered as "tools" in uv language, so the proper command is uv tool install ./dist/foobar.tar.gz.

The CLI tool seems to be available anywhere after that.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.