Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip3 have to re-download packages after Permission denied (no sudo) #4692

Closed
cryptogun opened this issue Aug 25, 2017 · 3 comments
Closed

pip3 have to re-download packages after Permission denied (no sudo) #4692

cryptogun opened this issue Aug 25, 2017 · 3 comments
Labels
auto-locked Outdated issues that have been locked by automation type: support User Support

Comments

@cryptogun
Copy link

  • Pip version: pip 9.0.1
  • Python version: python 3.5
  • Operating system: Linux Mint 4.4.0-45-generic # 66-Ubuntu SMP Wed Oct 19 14:12:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Description:

I forget to sudo pip and it takes 30 minutes downloading scipy. Then permission denied...
Now I have to spend another 30 minutes to re-install with sudo.
scipy 47.9MB 27kB/s

What I've run:

pip3 install doc2text

Installing collected packages: PyPDF2, scipy, pytesseract, future, mime, doc2text
  Running setup.py install for PyPDF2 ... error
    error: could not create '/usr/local/lib/python3.5/dist-packages/PyPDF2': Permission denied
@cryptogun cryptogun changed the title pip3 re-download packages after Permission denied (no sudo) pip3 have to re-download packages after Permission denied (no sudo) Aug 25, 2017
@pradyunsg pradyunsg added the type: support User Support label Aug 25, 2017
@pradyunsg
Copy link
Member

Hi! Thanks for filing this issue!

Have you considered using pip install --user? That is usually much better to do so - it does not try to meddle with your system packages which could potentially break your system, like a sudo pip install can.

About the re-downloading, I'm not the right person to comment on that. :)

@benoit-pierre
Copy link
Member

The behavior is expected: the cache directory is not the same when run as root with sudo compared to running with your normal user.

@cryptogun
Copy link
Author

Okay. What a quick reply :)
I'll try --user later. But why not make it as default, or print a warning that cmd was not run as root?
That make sense, non-root user can not cache for root user.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation type: support User Support
Projects
None yet
Development

No branches or pull requests

3 participants