在windows系统为Python安装matplotlib
# 1. 首先安装Visual Studio
访问:dev.windows.com
点击download
查找Visual studio community
下载安装
#2. 访问pypi.python.org/pypi/matpltlib
查找使用python版本匹配的wheel文件(扩展名为.whl的文件)
例如32位python,需要下载matplotlib-1.4.3-cp35-none-win32.whl
#3. 将.whl文件复制到项目文件夹,打开命令窗口,切换到项目文件夹,使用pip安装
cd python_work
python_work> python –m pip install –user matplotlib-1.4.3-cp35-none-win32.whl
#4. 测试matplotlib
$python3
import matplotlib
观察是否报错
附另一个画图测试:画出曲线
import matplotlib.pyplot as plt
squares = [1,4,5,6,25]
plt.plot(squares)