本文介绍了pkg_resources.DistributionNotFound:未找到“pip==1.5.4"分发版,应用程序需要此分发版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 Ubuntu 和 Python 2.7.6 上工作,我正在尝试使用 pip.当我只输入 pip
然后回车时,我得到:
Working on Ubuntu and Python 2.7.6, I am trying to use pip. When I type just pip
followed by enter, I get:
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
推荐答案
已更新至 2017 (Ubuntu 17)
Updated for 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
这篇关于pkg_resources.DistributionNotFound:未找到“pip==1.5.4"分发版,应用程序需要此分发版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!