pycharm安装库的时候报错Try to run this command from the system terminal. Make sure that you use the correct version of 'pip’和 Non-zero exit code(2)

报错信息:

error occurred: Non-zero exit code(2) proppsed solution:Try to run this command from the system terminal. Make sure that you use the correct version of 'pip’

请添加图片描述

回想为什么出现报错原因,好像是在 pip 版本更新之后,因为其它一些报错问题,让我更新pip版本到最新 22.1.2 ,结果更新之后就什么python库的装不上了。

解决:重新更换pip旧版本。
可以在pytharm的 Terminal 或cmd里执行命令:

python -m pip install pip==20.2.4

显示成功即可。
请添加图片描述

查看是否更换。
请添加图片描述

然后就可以正常安装库了。

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐