-1

When I typed:

python get-pip.py
 Collecting pip
  Using cached https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl
 Collecting wheel
  Using cached https://files.pythonhosted.org/packages/81/30/e935244ca6165187ae8be876b6316ae201b71485538ffac1d718843025a9/wheel-0.31.1-py2.py3-none-any.whl
 Installing collected packages: pip, wheel
  Found existing installation: pip 18.0
    Uninstalling pip-18.0:
      Successfully uninstalled pip-18.0
  Rolling back uninstall of pip

It is showing error:

 Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/pip'
 Consider using the `--user` option or check the permissions.

What should I do?

dmulter
  • 2,608
  • 3
  • 15
  • 24
Abhishek
  • 11
  • 3
  • 1
    I'm sure there is an answer to this already. You basically need to use a virtualenv, or sudo when installing packages. – dmulter Jul 24 '18 at 21:33
  • Possible duplicate of [How to install python3 version of package via pip on Ubuntu?](https://stackoverflow.com/questions/10763440/how-to-install-python3-version-of-package-via-pip-on-ubuntu) – ricky3350 Jul 24 '18 at 22:49
  • Possible duplicate of [pip install -r: OSError: \[Errno 13\] Permission denied](https://stackoverflow.com/questions/31512422/pip-install-r-oserror-errno-13-permission-denied) – phd Jul 24 '18 at 23:27

1 Answers1

0

It's a permissions error. You might need root to install pip, if the directories the installer is trying to access are owned by root. For security reasons, I recommend against installing it/running it with sudo, if you're trying to go that route.

Related: pip install -r: OSError: [Errno 13] Permission denied

ingernet
  • 1,342
  • 2
  • 12
  • 29