Warning when running pip with root privileges (sudo pip install)
See original GitHub issueHi!
In Fedora and perhaps other linux distributions it is generally ill advised to run pip install with root privileges, as it may interfere with system installed packages. Most use cases would be perfectly satisfied by running pip install --user instead.
I’m preparing a patch for pip in Fedora that will issue a warning to the user when pip installing with root privileges, and I’m wondering if you would be interested in a pull request upstream. I’m not familiar with the Windows and MacOS ecosystems so I’m not sure if they would perhaps benefit from the same treatment.
If there’s an interest, I would try to put a pull request together.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
WARNING: Running pip as the 'root' user - Stack Overflow
FROM python:3.8.3-alpine RUN pip install --upgrade pip RUN adduser -D myuser USER myuser WORKDIR /home/myuser COPY --chown=myuser:myuser ...
Read more >Running pip as the 'root' user can result in broken permissions
Use the --root-user-action=ignore option to ignore the "Running pip as the 'root' user can result in broken permissions" warning. Alternatively, ...
Read more >Add an opt-out for the “running as root” warning #10556 - GitHub
To be clear, the error only appears when you run pip as root, directly on a Python installation. If the goal is to...
Read more >Pip install issues. WARNING: Running pip as root will break ...
I was trying to work with Dabl Library. Though I've already worked with that Library I got: WARNING: Running pip as root will...
Read more >Do not run pip as root - GetPageSpeed
It is quite unfortunate that there is very little stating on the web of the quite obvious thing to be aware of.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t think we want to issue a warning, and I think that #1668 is the correct fix for this. I’m going to try and get that done in the near future.
Yes, I’m bad at keyboards 😅