Python的matplotlib库安装失败的解决方法
1. 第一种情况
Error:Could not find a version that satisfies the requirement pytz
这种错误一般是提醒你需要更新升级pip库,这个很简单,首先你需要进入python的所在盘,比如我是安装在E盘的,直接输入e:然后回车即可。

然后输入以下命令:
python -m pip install --upgrade pip
或者
python -m pip install --upgrade pip -i https://pypi.douban.com/simple
2.第二种情况
Error:Command errored out with exit status 1:
如果pip库升级成功,并且报以上错误的,反正就是出来满屏幕的红色报错
第一步:下载合适的 matplotlib 下载地址
自己需要先去看自己安装的版本,一般打开Shell就能看到了,cp38就是3.8版本,

第二步
把下载的whl文件放到Python\Scripts的文件夹里。
第三步
打开cmd;
进入e盘;
进入Scripts文件夹:cd Python\Scripts就可以进入了;
最后输入安装命令即可
pip install matplotlib-3.2.0rc2-cp38-cp38-win32.whl
最后贴上成功安装的图 欢迎提问~

赞 (0)