python pycharm安装第三方包matplotlib、numpy失败,解决办法

最近刚看python,用pycharm遇到些问题

安装第三方包matplotlib、numpy失败,如下:

  1. 打开PyCharm,点击File->Settings->Project->Python Interpreter->右侧界面的“+”号:
  2. 在输入框中输入:matplotlib ,点击下方的Install Package,等待一段时间,提示error

环境:win10+pycharm+python 3.8

同类问题解决关键

管理员权限+升级pip版本+国内源安装包

Try to run this command from the system terminal. Make sure that you use the correct version of ‘pip’ installed for your Python interpreter located at

 ‘C:\Users\xgwang\AppData\Local\Programs\Python\Python38\python.exe’.

解决步骤

    1.  使用管理员模式打开pycharm

    2.  首先升级pip版本

python -m pip install --upgrade pip

(或:python -m pip install -U --force-reinstall pip)

    3. 后来错误演变为如下,

ERROR: Could not find a version that satisfies the requirement pip (from versions: none)

ERROR: No matching distribution found for pip

    4.换成国内的pip源 可以解决问题

pip install numpy -i http://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com

pip install matplotlib -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

成功!

  

 

 成功之后的提示:

 

 

 

参考:

https://blog.csdn.net/JineD/article/details/124774570

https://blog.csdn.net/u012592062/article/details/51966649

https://zhuanlan.zhihu.com/p/97893886

 感谢小爽帮我一块分析解决问题!!

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
心中带点小风骚的头像心中带点小风骚普通用户
上一篇 2023年11月6日
下一篇 2023年11月6日

相关推荐