error: could not create '/Library/Python/2.7/site-packages/xlrd': Permission denied error: could not create '/Library/Python/2.7/site-packages/xlrd': Permission denied python python

error: could not create '/Library/Python/2.7/site-packages/xlrd': Permission denied


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


try sudo python setup.py install

the /Library folder needs root permission to be accessed.


Try in a virtualenv:

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