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

╄→尐↘猪︶ㄣ 提交于 2019-11-28 17:11:54

try sudo python setup.py install

the /Library folder needs root permission to be accessed.

Louis Maddox

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
Nitin

Try in a virtualenv:

  • sudo pip install virtualenvwrapper
  • mkvirtualenv
  • workon
  • python setup.py install
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!