2016-12-07 104 views
0

更新後pip我現在看到以下錯誤日誌。我該如何解決它?我正在使用Python 2.7。更新後在Ubuntu 14.04 LTS上的pip損壞

Traceback (most recent call last): 
File "/usr/local/bin/pip", line 5, in <module> 
from pkg_resources import load_entry_point 
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3013, in <module> 
@_call_aside 
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2999, in _call_aside 
f(*args, **kwargs) 
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3026, in _initialize_master_working_set 
working_set = WorkingSet._build_master() 
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 657, in _build_master 
return cls._build_from_requirements(__requires__) 
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 670, in _build_from_requirements 
dists = ws.resolve(reqs, Environment()) 
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 849, in resolve 
raise DistributionNotFound(req, requirers) 
pkg_resources.DistributionNotFound: The 'pip==7.1.0' distribution was not found and is required by the application 
+0

您是如何更新點子的?通過'apt-get update'? – jkalden

+0

我已經使用這個命令後,它停止工作。 'pip install -U setuptools pip' – user7176771

回答

1

我已通過以下過程解決它。

1: 下載pip 7.1.0 version並解壓到以下路徑

usr/local/lib/python2.7/dist-packages/pkg_resources 

第二: 使用以下命令

sudo chmod -R 777 python2.7/ 

那麼如果我用給可執行權限蟒蛇2.7目錄pip -V命令來檢查點的版本,它顯示我的版本7.1.0沒有任何錯誤日誌。

+0

請注意,您已將目錄世界變爲可寫,這是一個可怕的想法。 –