最近使用Python过程中,需要使用matplotlib,但是在import的时候被告知没有该模块,那么就开始安装~
我是在安装了numpy的前提下安装matplotlib
刚开始我是使用pip进行安装:pip install matplotlib
然而问题来了:
重试,还是报错,想想有可能是依赖包没有加载完,所以换成yum命令进行更新安装:yum install python-matplotlib
再import matplotlib,no problem!
本文介绍了一种在Python环境中解决matplotlib安装失败的方法。作者最初尝试使用pip安装但遇到错误,在检查了依赖项并改用yum命令后成功安装了matplotlib。
最近使用Python过程中,需要使用matplotlib,但是在import的时候被告知没有该模块,那么就开始安装~
我是在安装了numpy的前提下安装matplotlib
刚开始我是使用pip进行安装:pip install matplotlib
然而问题来了:
重试,还是报错,想想有可能是依赖包没有加载完,所以换成yum命令进行更新安装:yum install python-matplotlib
再import matplotlib,no problem!
1760
2627

被折叠的 条评论
为什么被折叠?