Python安装matplotlib
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python安装matplotlib相关的知识,希望对你有一定的参考价值。
1.下载matplotlib安装程序

2.放入项目所在文件夹

3.打开控制台并输入
python -m -pip install --user whl文件名

4.等待安装完成

5.测试matplotlib能否正常导入

没有报错说明可以正常导入和使用
6.测试matplotlib运行效果
import matplotlib.pyplot as plt squares = [1,4,9,16,25] plt.plot(squares) plt.show()

效果挺好的
以上是关于Python安装matplotlib的主要内容,如果未能解决你的问题,请参考以下文章
Python matplotlib 基础练习:画出正弦曲线等
python安装matplotlib:python -m pip install matplotlib报错