2016-07-26 59 views
0

使用Ubuntu和python 2.7.6。當我嘗試使用PIP,只是PIP依次輸入,pkg_resources.DistributionNotFound:未找到'pip == 1.5.4'發行版,並且應用程序需要

File "/usr/local/bin/pip", line 5, in <module> 
    from pkg_resources import load_entry_point 
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3095, in <module> 
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3081, in _call_aside 
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3108, in _initialize_master_working_set 
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 660, in _build_master 
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 673, in _build_from_requirements 
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 846, in resolve 
pkg_resources.DistributionNotFound: The 'pip==1.5.4' distribution was not found and is required by the application 
+0

一般其中要求來自'pip'狀態的輸出。您應該添加'pip'的全部輸出(並將其格式化爲代碼)。 –

回答

0

面臨着同樣的問題與Ubuntu 14.04,python2.7.6和PIP 1.5.4。 我這樣做,

sudo apt-get install --reinstall python2.7 

要重新安裝蟒(雖然不是必要的)

sudo apt-get purge python-pip 

(除去蟒蛇PIP)

wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py 

(從這個下載,這是升級版(9 ))

sudo python get-pip.py 
sudo pip install package-name 

這工作!

+0

謝謝..工作!!!!!! – Bharadwaj

+0

工作,但過時。增加了一個新的 –

2

更新了2017(Ubuntu的17)

sudo apt-get purge python-pip 
wget https://bootstrap.pypa.io/get-pip.py 
sudo python get-pip.py 
pip --version 
rm get-pip.py 
相關問題