我的pip3
似乎被打破了:
$ pip3 --version
Traceback (most recent call last):
File "/usr/bin/pip3", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2708, in <module>
working_set.require(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 686, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pip==1.5.6
我尝试使用pip3
重新安装easy_install3
来解决此问题,但easy_install3
也已损坏:
$ sudo easy_install3 --upgrade pip3
Traceback (most recent call last):
File "/usr/bin/easy_install3", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2708, in <module>
working_set.require(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 686, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: distribute==0.6.24dev-r0
从apt重新安装pip3也无济于事。
$ sudo apt-get remove python3-pip
$ sudo apt-get install --fix-missing -t testing python3-pip
我正在运行Debian 7(稳定版)。我从测试库安装了Python 3.4.2。
答案 0 :(得分:8)
答案 1 :(得分:6)
我必须下载并运行两个脚本,get-pip.py
和ez_setup.py
sudo python3 get-pip.py
sudo python3 ez_setup.py
那些修复了pip3和easy_install3。