python数据可视化——安装matplotlib

来源:互联网 发布:淘宝会员怎么解绑虾米 编辑:程序博客网 时间:2024/06/06 20:16

在windows中安装

1、首先需要安装Visual Studio

访问http://dev.windows.com,单击downloads,再查找Visual Studio Community——一组免费的Windows开发工具。下载并运行该安装程序。

2、下载matplotlib安装程序。

访问https://pypi.python.org/pypi/matplotlib,查找与python版本相配的wheel文件(扩展名为.whl文件)

3、使用pip来安装matplotlib

python -m pip install --user matplotlib-2.1.0-cp36-cp36m-win32.whl

4、测试matplotlib

D:\Program Files>python
Python 3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)]
 on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib

导入matplotlib,如果没有出现任何错误消息,就说明你的系统安装了matplotlib.

5、matplotlib画廊

要查看使用matplotlib可制作的各种图表,请访问//http://matplotlib.org/的示例画廊。单击画廊中的图表,就可查看用于生成图表的代码。

原创粉丝点击