Skip to content Skip to sidebar Skip to footer

Error: Could Not Create '/library/python/2.7/site-packages/xlrd': Permission Denied

I'm trying to install xlrd on mac 10.8.4 to be able to read excel files through python. I have followed the instructions on http://www.simplistix.co.uk/presentations/python-excel.p

Solution 1:

Try python setup.py install --user

You shouldn't use sudo as suggested above for two reasons:

  1. You're allowing arbitrary untrusted code off the internet to be run as root
  2. Passing the --user flag to python setup.py install will install the package to a user-owned directory. Your normal non-root user won't be able to access the files installed by sudo pip or sudo python setup.py

Solution 2:

try sudo python setup.py install

the /Library folder needs root permission to be accessed.

Solution 3:

Try in a virtualenv:

  • sudo pip install virtualenvwrapper
  • mkvirtualenv
  • workon
  • python setup.py install

Post a Comment for "Error: Could Not Create '/library/python/2.7/site-packages/xlrd': Permission Denied"