gpt4 book ai didi

python - pip3 导入错误 : cannot import name 'IncompleteRead'

转载 作者:太空狗 更新时间:2023-10-29 20:38:37 25 4
gpt4 key购买 nike

通过 pip3 安装模块时遇到问题,尝试了 2014 年 12 月投票最高的线程中的几个建议,但仍然得到以下信息:

sudo pip3 install send2trash
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/__init__.py", line 558, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2355, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2361, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 74, 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 15.10 上;尝试完全删除 python 3 并重新安装,仍然有问题。帮忙?

编辑:更新:尝试使用我的可启动 USB 修复 Ubuntu 并返回原始配置并通过 sudo apt-get install python3-pip 重新安装,但现在它生成崩溃报告说:

Sorry, the application pip3 has unexpectedly crashed.

最佳答案

This seems to be an issue with pip's interaction with the requests package . requests 删除了 IncompleteRead 模块,但是您拥有的旧版本的 pip 仍然依赖它,而新版本则没有。

您应该尝试通过 easy_install-3.5(如果您有 Python 3.5)或 easy_install-3 更新 pip > 对于其他版本:

sudo easy_install-3.5 -U pip

或者:

sudo easy_install-3 -U pip

你应该可以开始了。

关于python - pip3 导入错误 : cannot import name 'IncompleteRead' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34580806/

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