uv pip install --system
fails because python installation is managed by uv?
#12204
Labels
question
Asking for clarification or support
Summary
Summary of the issue
Attempting to install a package for all users with the command
uv pip install --system
fails because the python installation is "externally managed" by uv itself.What am I trying to achieve?
I'm using a Raspberry Pi 5 to control a robot in our lab. I've written a Python package (called
thormotion
) which can be used to control the robot. I want to makeuv
,python 3.13
and thethormotion
package available by default to all users on the raspberry pi, without needing to re-install the package for each new user.What have I done so far?
Starting from a fresh install of Raspberry Pi OS Lite 64-bit, I installed
uv
into a non-user-specific location.This works as expected. Running
uv --version
returnsuv 0.6.6
when logged in as any user.Next, I installed python 3.13, again setting the environment variables to non-user-specific locations.
Calling
uv python list
is able to show this new python installation when logged in as any user. Note that, even though I set the--default
flag,python --version
still returnsPython 3.11.2
which is the default python executable that come pre-installed on Raspberry Pi OS. That's not necessarily a deal-breaker, but was unexpected from my understanding of the--default
flag's purpose.Exploring the issue
At this stage, I was ready to install the
thormotion
package for the new python 3.13 installation to make it available to all users.Running
uv pip install thormotion
returned the following error:Okay, fair enough. The hint is pretty clear that I need to add the
--system
flag to install packages into the system Python environment. Lets try it:Now this confused me. Of course the Python installation is managed by
uv
, that's why I'm running auv
command. What is the purpose of the--system
flag if it can't operate onuv
managed Python installations?Workaround
After trying various alternatives, I was able to get the
thormotion
package to install by adding the--break-system-packages
flag.Whilst this does work, the fact that
--break-system-packages
is required makes me feel that I may have completely misunderstood the purpose of the--system
flag.Final questions
--system
flag?--break-system-packages
workaround the recommended solution, or is there a better way?Platform
Raspberry Pi OS Lite (64-bit, based on Debian Bookworm)
Version
0.6.6
Python version
3.13.2
The text was updated successfully, but these errors were encountered: