[英]Permission Denied on httplib2 install
I'm trying to install the httplib2 library for Python so I can use it to interact with the Twitter but I get the following error in the console when I try to install via 'python setup.py install'. 我正在尝试为Python安装httplib2库,因此我可以使用它与Twitter进行交互,但当我尝试通过'python setup.py install'安装时,我在控制台中收到以下错误。
This is a new MBA and I am the only user (and Admin) so I shouldn't get denied so rudely! 这是一个新的MBA,我是唯一的用户(和管理员)所以我不应该这么粗鲁地被拒绝!
error: could not create '/Library/Python/2.7/site-packages/httplib2': Permission denied
Thoughts? 思考?
使用sudo
以root身份运行setup.py
:
% sudo python setup.py install
Some say that using sudo
on python setup.py install
can be dangerous. 有人说在python setup.py install
上使用sudo
可能很危险。 Instead, run sudo chown -R $USER /Library/Python/2.7
. 相反,运行sudo chown -R $USER /Library/Python/2.7
。
TL;DR; TL; DR; Using Virtualenv also happens to avoid this problem. 使用Virtualenv也可以避免这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.