user4591532 user4591532 - 4 months ago 49
Python Question

ubuntu python pip can't uninstall pillow

When I try to uninstall pillow using pip ,it outputs:

qixin@qixin:~$ pip uninstall pillow
Uninstalling Pillow:
Proceed (y/n)? y
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.4-py2.7.egg/pip/", line 122, in main
status =, args)
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.4-py2.7.egg/pip/commands/", line 59, in run
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.4-py2.7.egg/pip/", line 1035, in uninstall
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.4-py2.7.egg/pip/", line 598, in uninstall
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.4-py2.7.egg/pip/", line 1836, in remove
renames(path, new_path)
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.4-py2.7.egg/pip/", line 295, in renames
shutil.move(old, new)
File "/usr/lib/python2.7/", line 303, in move
OSError: [Errno 13] Permission denied: '/usr/local/bin/'

Storing debug log for failure in /tmp/tmpEmRbAF

My OS is ubuntu 14.04,python's version is 2.7.
Why did it fail? Thanks much!


This is because the command you ran didn't have the correct operating system level permissions. On windows, that command would have worked fine, but on Ubuntu pip needs sudo added before it so that it is root and can get the correct permissions.

You should enter sudo pip uninstall pillow.