1

I try to upgrade pip with pip install -U pip and I get:

Collecting pip Using cached pip-8.0.2-py2.py3-none-any.whl

Installing collected packages: pip Found existing installation: pip 7.1.0 Uninstalling pip-7.1.0:

Exception:

Traceback (most recent call last):

File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 223, in main status = self.run(options, args)

File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 299, in run root=options.root_path,

File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 640, in install requirement.uninstall(auto_confirm=True) File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 726, in uninstall paths_to_remove.remove(auto_confirm)

File "/usr/local/lib/python2.7/dist-packages/pip/req/req_uninstall.py", line 125, in remove renames(path, new_path)

File "/usr/local/lib/python2.7/dist-packages/pip/utils/init.py", line 314, in renames shutil.move(old, new)

File "/usr/lib/python2.7/shutil.py", line 303, in move os.unlink(src)

OSError: [Errno 13] Permission denied: '/usr/bin/pip'

3 Answers 3

0

Looks you are getting a permission error, try running your command as super user:

sudo pip install -U pip
Sign up to request clarification or add additional context in comments.

Comments

0

Looks like you don't have permission to write to the system folder. You can avoid the problem by installing the packages to the user folder. So this is the code you have to use for upgrading the pip.

python -m pip install --user --upgrade pip

Comments

0

add python to your command with --user. It should work

python -m pip install --user --upgrade pip

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.