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