PIP无法导入名称' ssl_match_hostname'错误
我的pip突然停止工作。我会收到以下错误:
追溯(最近的最新通话): Importerror:无法从部分初始化的模块'pip中导入名称“ ssl_match_hostname”。分析\ venv \ lib \ sit e-packages \ pip_vendor \ urllib3 \ packages_ init .py)
这是在虚拟环境中运行的,其他虚拟环境正常工作。我不太记得,但是我认为几天前我进行了PIP更新,此后还没有使用过。
有什么可以恢复使用PIP的解决方案吗?
My pip has suddenly stopped working. I get the following error:
Traceback (most recent call last):
ImportError: cannot import name 'ssl_match_hostname' from partially initialized module 'pip.vendor.urllib3.packages' (most likely due to a circular import) (c:\users\ed\onedrive\software dev\own projects\market analysis\venv\lib\sit
e-packages\pip_vendor\urllib3\packages_init.py)
This is run within a virtual environment and other virtual environments are working fine. I can't quite remember but I think I did a pip update a few days ago and haven't used it since.
Are there any solutions to regain use of pip?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以尝试卸载然后重新安装PIP,这将清除任何(希望)破碎或损坏的任何东西。
You can try to uninstall and then reinstall pip, that would clear up anything (hopefully) broken or corrupted.
强迫重新安装PIP对我有用。
参考: https://stackoverflow.com/a/a/a/678886408/4254808
Forced reinstallation of pip worked for me.
Ref: https://stackoverflow.com/a/67886408/4254808