Reputation: 267000
I was trying to install something using pip, and I keep getting this UserWarning error (see below).
I tried to upgrade pip and you can see the error below.
I haven't used python on my system in a while and it seems to be broken. What could it be?
pip install -U pip
/usr/local/bin/pip:5: UserWarning: Module _markerlib was already imported from /Library/Python/2.7/site-packages/distribute-0.6.49-py2.7.egg/_markerlib/__init__.pyc, but /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python is being added to sys.path
from pkg_resources import load_entry_point
Downloading/unpacking pip from https://pypi.python.org/packages/py2.py3/p/pip/pip-7.1.2-py2.py3-none-any.whl#md5=5ff9fec0be479e4e36df467556deed4d
Downloading pip-7.1.2-py2.py3-none-any.whl (1.1MB): 1.1MB downloaded
Installing collected packages: pip
Found existing installation: pip 1.5.6
Uninstalling pip:
Cleaning up...
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/Library/Python/2.7/site-packages/pip/req.py", line 1431, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip/req.py", line 598, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip/req.py", line 1836, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip/util.py", line 295, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
os.unlink(src)
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip-1.5.6.dist-info/DESCRIPTION.rst'
Storing debug log for failure in /Users/blankman/Library/Logs/pip.log
Upvotes: 2
Views: 1556
Reputation: 21
Its just that you need root access in order to change or update
Try either: sudo apt-get install pip --upgrade
or: sudo pip install -U pip
or: sudo pip install pip --upgrade
Upvotes: 1
Reputation: 1162
I see you have
OSError: [Errno 13] Permission denied:
this means you need root access to install the package. since you are not installing in a virtual env. it's installing for the global system.
try with sudo
Upvotes: 6