当我尝试通过终端

时间:2017-04-10 13:08:23

标签: python pip install tweepy

copying tweepy/error.py -> build/lib/tweepy
copying tweepy/models.py -> build/lib/tweepy
copying tweepy/oauth.py -> build/lib/tweepy
copying tweepy/parsers.py -> build/lib/tweepy
copying tweepy/streaming.py -> build/lib/tweepy
copying tweepy/utils.py -> build/lib/tweepy
running install_lib
creating /Library/Python/2.7/site-packages/examples
error: could not create '/Library/Python/2.7/site-packages/examples': Permission denied

----------------------------------------

命令" / usr / bin / python -u -c"导入setuptools,tokenize; 文件 =' / private / var / folders / zq / k3pbc5v57gn07qqg7qxxnrmm0000gn /T/pip-build-R8mYNT/tweepy/setup.py';f=getattr(tokenize,' open',open)( file ); code = f。 read()。replace(' \ r \ n',' \ n'); f.close(); exec(编译(代码,文件, ' EXEC'))" install --record /var/folders/zq/k3pbc5v57gn07qqg7qxxnrmm0000gn/T/pip-ZdPzhK-record/install-record.txt --single-version-external-managed --compile"在/ private / var / folders / zq / k3pbc5v57gn07qqg7qxxnrmm0000gn / T / pip-build-R8mYNT / tweepy /

中出现错误代码1失败

1 个答案:

答案 0 :(得分:0)

Python安装位于“/ home / username /”目录之外。您需要使用root权限才能授予您访问目录的权限。

$ sudo pip install tweety 
  • 如上所述使用sudo只会应用其后的命令。