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'.
This is a new MBA and I am the only user (and Admin) so I shouldn't get denied so rudely!
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. Instead, run sudo chown -R $USER /Library/Python/2.7
.
TL;DR; Using Virtualenv also happens to avoid this problem.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.