python安装matplotlib包报错:ERROR: Could not find a version that satisfies the requirement matplotlib

python安装matplotlib包报错:ERROR: Could not find a version that satisfies the requirement matplotlib (from versions: none)ERROR 以及其他ERROR: Could not find a version that satisfies the requirement xxx包 (from versions: none)的解决方案

遇到的问题

一个项目需要用到matplotlib包,但是发现之前没有安装过,故习惯性按照如下方法尝试安装

file->setting->project:项目名>python interpreter->搜索 matplotlib->install->报错 ERROR: Could not find a version that satisfies the requirement matplotlib (from versions: none)ERROR

结果报错版本不匹配。。下面开始找解决方法

失败的过程

不知道是不是pip的问题?尝试更新pip

打开安装py的可执行文件的位置,然后

python.exe -m pip install --upgrade pip -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

已经是最新了,看来和pip版本没关系
在这里插入图片描述

考虑国内的网络情况,用镜像源发现可以连接到,但是网速只有0.1kb/s,没办法只能再换

pip install 包名 -i -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
(忘记截图了这里)

最终解决方案

最后找到了清华的镜像,这次很快啊,瞬间下载完成

pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple matplotlib

附上成功截图
在这里插入图片描述

举一反三

看来主要原因还是网络问题,需要找一个靠谱的镜像。经过此次教训,诸如此类报错:ERROR: Could not find a version that satisfies the requirement xxx包 (from versions: none)
只需使用清华镜像https://pypi.tuna.tsinghua.edu.cn,运行
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple xxx包名
即可

参考

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

特别感谢清华大学开源软件镜像站

评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值