gpt4 book ai didi

python - 损坏的 pip3 和 easy_install3 : DistributionNotFound

转载 作者:太空狗 更新时间:2023-10-29 22:09:13 25 4
gpt4 key购买 nike

我的 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 也坏了:

$ 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。

最佳答案

让一切恢复正常的最简单方法可能是下载 get-pip.py , 然后运行

sudo python3 get-pip.py

这会将 pip 升级到最新版本(当前为 6.1.1)并同时更新 setuptools

关于python - 损坏的 pip3 和 easy_install3 : DistributionNotFound,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30288404/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com