当我试图通过我的终端下载pip install tweepy时,我遇到了这个错误

2024-09-29 07:31:39 发布

您现在位置:Python中文网/ 问答频道 /正文

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;file='/private/var/folders/zq/k3pbc5v57gn07qqqg7qxxnrm0000gn/T/pip-build-R8mYNT/tweepy/设置.py';f=getattr(tokenize,'open',open)(文件);code=f.read().replace('\r\n','\n');f.close();exec(compile(code,file,'exec'))“install--record/var/folders/zq/k3pbc5v57gn07qqg7qxxnrm0000gn/T/pip ZdPzhK记录/安装-记录.txt--单版本外部管理--compile“失败,错误代码1位于/private/var/folders/zq/k3pbc5v57gn07qqg7qxxnrm0000gn/T/pip-build-R8mYNT/tweepy/


Tags: installpippybuildvarlibpackageslibrary
1条回答
网友
1楼 · 发布于 2024-09-29 07:31:39

Python安装在'/home/username/'目录之外。您需要使用根权限授予您访问目录的权限。在

$ sudo pip install tweety 
  • 如上所述使用sudo将只应用后面的命令。在

相关问题 更多 >