[英]Easy_install and Pip doesn't work
當我嘗試這樣做時,Easy_install和Pip在python 2.7上不再起作用了:
sudo easy_install pip
我明白了:
Traceback (most recent call last):
File "/usr/bin/easy_install", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/bin/lib/python2.7/site-packages/distribute-0.6.19-py2.7.egg/pkg_resources.py", line 2713, in <module>
parse_requirements(__requires__), Environment()
File "/usr/bin/lib/python2.7/site-packages/distribute-0.6.19-py2.7.egg/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: distribute==0.6.15
當我嘗試:
sudo pip install [package]
我明白了:
Traceback (most recent call last):
File "/usr/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/bin/lib/python2.7/site-packages/distribute-0.6.19-py2.7.egg/pkg_resources.py", line 2713, in <module>
parse_requirements(__requires__), Environment()
File "/usr/bin/lib/python2.7/site-packages/distribute-0.6.19-py2.7.egg/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pip==0.8.2
我已經安裝了它們(是的,先刪除它們),但沒有結果......
謝謝!
我有這個問題,因為某些原因沒有安裝python的分發包。 按照python-distribute上的說明操作后,我開始工作了。
安裝分發包如下:
$ wget https://web.archive.org/web/20100225231201/http://python-distribute.org/distribute_setup.py
$ python distribute_setup.py
編輯: http : //python-distribute.org/distribute_setup.py不再有效:
希望這將解決您的運行問題
$ sudo easy_install
快樂的編碼!
如果您通過Distribute安裝了新版本的easy_install
,則新命令可能已安裝在另一個目錄中,很可能是/usr/local/bin/
。 但是回溯顯示你正在使用/usr/bin/easy_install
。 試試這個:
sudo /usr/local/bin/easy_install ...
嘗試
sudo easy_install Distribute
如果存在,但是太舊了
sudo easy_install -U Distribute
看起來像Distribute / setuptools(它的舊名稱)搞砸了或Python包設置。 如果其中任何一個沒有幫助,請嘗試刪除完整的Python 2.7安裝並從頭開始重新安裝所有內容。
混亂的可能原因是您使用了sudo easy_install / sudo pip和Linux發行包來混合和匹配系統范圍的安裝包。 如果你使用pip / easy_install(不需要sudo),你應該使用virtualenv
我遇到了類似的問題,但事情根本就是正常的。 在我的情況下,我發現python包的權限不能被我運行命令的ID讀取。
為了糾正它,我運行以下命令來打開所有用戶的讀取和執行權限:
sudo chmod o+rx -R /usr/local/lib/python2.7/dist-packages/*.egg
嘗試通過pip
在windows
上使用python 3.6
安裝軟件包時遇到了類似的問題。 (pip應該在這個安裝時開箱即用)
該問題未以管理員身份運行。
以管理員身份運行cmd然后安裝我的包工作:
python -m pip install pylint
我試圖讓pip在2.7.0版本上工作,但似乎它沒有附帶easy_install / pip文件(主目錄中的Script文件夾),安裝2.7.13解決了我的問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.