繁体   English   中英

在ubuntu上下载python错误请求

[英]Downloading Requests for python error on ubuntu

我在计算机上运行ubuntu,正在尝试下载请求

但是,当我执行pip install requests它给了我一个错误:

writing manifest file 'requests.egg-info/SOURCES.txt'

running install_lib

creating /usr/local/lib/python2.7/dist-packages/requests

error: could not create '/usr/local/lib/python2.7/dist-packages/requests': Permission denied

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/home/alejandro/build/requests/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-tT3Boe-record/install-record.txt failed with error code 1

是否有人有任何技巧可以解决或解决此问题?

你的错误

could not create '/usr/local/lib/python2.7/dist-packages/requests': Permission denied

建议您尝试以普通用户的身份在系统范围内安装该软件包-您无权执行此操作。

您可以使用--user选项为自己安装软件包:

pip install --user requests

...或使用sudo在系统范围内以root身份安装:

sudo pip install requests

或者,您可以考虑使用虚拟环境

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM