损坏的 pip3 和 easy_install3:DistributionNotFound [英] Broken pip3 and easy_install3: DistributionNotFound

查看:39
本文介绍了损坏的 pip3 和 easy_install3:DistributionNotFound的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 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

我尝试通过使用 easy_install3 重新安装 pip3 来修复它,但是 easy_install3 也坏了:

I tried to fix it by reinstalling pip3 with easy_install3, but easy_install3 is also broken:

$ 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 也没有帮助.

Reinstalling pip3 from apt did not help either.

$ sudo apt-get remove python3-pip
$ sudo apt-get install --fix-missing -t testing python3-pip

我正在运行 Debian 7(稳定版).我从测试存储库安装了 Python 3.4.2.

I am running Debian 7 (stable). I have Python 3.4.2 installed from the testing repository.

推荐答案

我不得不下载并运行两个脚本,get-pip.pyez_setup.py

I had to download and run two scripts, get-pip.py and ez_setup.py

sudo python3 get-pip.py
sudo python3 ez_setup.py

那些修复了 pip3 和 easy_install3.

Those fixed both pip3 and easy_install3.

这篇关于损坏的 pip3 和 easy_install3:DistributionNotFound的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆