gpt4 book ai didi

python - 如何修复 'ImportError: cannot import name IncompleteRead' ?

转载 作者:IT老高 更新时间:2023-10-28 12:08:36 32 4
gpt4 key购买 nike

当我尝试使用 pippip3 安装任何东西时,我得到:

$ sudo pip3 install python3-tk
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip3')()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 356, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2476, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2190, in load
['__name__'])
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 61, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python3/dist-packages/pip/vcs/mercurial.py", line 9, in <module>
from pip.download import path_to_url
File "/usr/lib/python3/dist-packages/pip/download.py", line 25, in <module>
from requests.compat import IncompleteRead
ImportError: cannot import name 'IncompleteRead'

我有一个 Ubuntu 14.10 系统。

我该如何解决这个问题?

最佳答案

this previous answer可能是原因,这个片段对我来说是一种解决方案(在 Ubuntu 14.04 中):

首先从包管理器中删除包:

# apt-get remove python-pip

然后并排安装最新版本:

# easy_install pip

(感谢@Aufziehvogel,@JunchaoGu)

关于python - 如何修复 'ImportError: cannot import name IncompleteRead' ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27341064/

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