Pip: get-pip.py error

Created on 2 Jan 2015  路  6Comments  路  Source: pypa/pip

Collecting pip
  Using cached pip-6.0.3-py2.py3-none-any.whl
Installing collected packages: pip

  Exception:
  Traceback (most recent call last):
    File "/var/folders/53/d1q9qj6j0bg6kdnnvpy13hn80000gp/T/tmpENervc/pip.zip/pip/basecommand.py", line 215, in main
      status = self.run(options, args)
    File "/var/folders/53/d1q9qj6j0bg6kdnnvpy13hn80000gp/T/tmpENervc/pip.zip/pip/commands/install.py", line 347, in run
      root=options.root_path,
    File "/var/folders/53/d1q9qj6j0bg6kdnnvpy13hn80000gp/T/tmpENervc/pip.zip/pip/req/req_set.py", line 548, in install
      **kwargs
    File "/var/folders/53/d1q9qj6j0bg6kdnnvpy13hn80000gp/T/tmpENervc/pip.zip/pip/req/req_install.py", line 751, in install
      self.move_wheel_files(self.source_dir, root=root)
    File "/var/folders/53/d1q9qj6j0bg6kdnnvpy13hn80000gp/T/tmpENervc/pip.zip/pip/req/req_install.py", line 960, in move_wheel_files
      isolated=self.isolated,
    File "/var/folders/53/d1q9qj6j0bg6kdnnvpy13hn80000gp/T/tmpENervc/pip.zip/pip/wheel.py", line 234, in move_wheel_files
      clobber(source, lib_dir, True)
    File "/var/folders/53/d1q9qj6j0bg6kdnnvpy13hn80000gp/T/tmpENervc/pip.zip/pip/wheel.py", line 205, in clobber
      os.makedirs(destdir)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
      mkdir(name, mode)
  OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip
auto-locked

Most helpful comment

You're attempting to install to the system while you don't have permissions to do so. You need to either use sudo get-pip.py or get-pip.py --user.

All 6 comments

You're attempting to install to the system while you don't have permissions to do so. You need to either use sudo get-pip.py or get-pip.py --user.

should I use "--user" everytime I use pip for something?? since it doesnt seem to work for me unless I add --user everytime at the end of pip command

@aaashishK or learn virtualenv which allows you to create self-contained environments to install a set of python packages into, instead of needing to do so over the system environment.

pip --user is equivalent to saying "install this python package for my user account" rather than "for the whole system" so for packages you want widely available to yourself, yes that's a good idea.

thanks manm thanks @lvoz

when I installing with pip I do receive this error:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 300, in move
rmtree(src)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 252, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 250, in rmtree
os.remove(fullname)
OSError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nltk-3.2.2-py2.7.egg-info/dependency_links.txt'

should I use "--user" everytime I use pip for something?

Yep. :)

Was this page helpful?
0 / 5 - 0 ratings