[英]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.