Error while installing Fabric on OSX using recommended pip. Xcode is latest version

StackOverflow https://stackoverflow.com/questions/21214260

  •  29-09-2022
  •  | 
  •  

Question

I just tried to install Fabric on my Mac, and I was thrown this error after using pip install fabric

Installing collected packages: fabric, paramiko, pycrypto, ecdsa
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/commands/install.py", line 275, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/req.py", line 1371, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/req.py", line 655, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/req.py", line 885, in move_wheel_files
    pycompile=self.pycompile,
  File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/wheel.py", line 209, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/wheel.py", line 196, in clobber
    os.makedirs(destsubdir)
  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/fabfile'

Storing debug log for failure in /Users/michaelsnowden/Library/Logs/pip.log

Here is the entire debug log

What does this mean, and why am I getting this error?

Était-ce utile?

La solution

For a system wide pip install you need to do a sudo:

sudo pip install fabric

Since the system wide packages are available globally, they are written outside paths that have write permission for a normal user. In that case you need to do a sudo other permission to write to those folders would be denied to you.

When installed globally, you can invoke the Python interpreter anywhere in your system and import fabric would be available to you. Also, it would be available to any user of your system.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top