【python】matplotlib在windows10 和win7下安装
2015-09-28 18:43
826 查看
win7系统升级win10后重装matplotlib
file resources
![](http://img.blog.csdn.net/20160506155600399?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
win10 64位操作系统
1)Python2.7 64位 环境变量path
python安装路径
2)pip-8.1.1 (source) 命令:python setup.py install
环境变量path
D:\sftwre_path\python27\Scripts
3)安装完pip后所有的wheel文件都用这个命令安装,图上所需的wheel文件都可以从链接4找到,顺序可以numpy,dateutil,pyparsing,six,scipy,最后matplotlib
命令:
pip install wheel
pip install *.wheel
4)用代码测试
这是之前win7 64位安装查找的资料(转载)
链接1 http://blog.sciencenet.cn/blog-579770-738240.html
链接2 http://www.open-open.com/lib/view/open1393488232380.html
链接3 http://blog.csdn.net/yang6464158/article/details/18546871#comments
链接4 http://www.lfd.uci.edu/~gohlke/pythonlibs/
链接123是靠谱的安装过程;此过程中需要的各种程序包都能在链接4(非官方下载,比较全)里找到。
注意:各个安装程序的版本必须一致,这里都统一用windows,64 bit,python2.7版本(据说Python3.*系列对于一些安装包不兼容,故选取了比较旧的python2.7版本)!!!!
1、python下载地址https://www.python.org/download/
2、安装与python相对应版本的Matplotlib,下载地址http://matplotlib.org/downloads.html
3、对于标准版本的Python,要使用Matplotlib,需要安装numpy模块,下载地址见链接4
4、可能还会用到msvcp.dll库,自行在网上搜一个添加到C:windowssystem32目录下。
此时如果运行 import matplotlib.pyplot as plt 可能会显示以下错误:
raise ImportError("matplotlib requiresdateutil")
ImportError: matplotlib requires dateutil
意味着需要dateutil
5、安装dateutil,下载地址http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-dateutil
此后又出现错误:
raise ImportError("matplotlib requirespyparsing")
ImportError: matplotlib requires pyparsing
意味着需要pyparsing
6、安装pyparsing,下载地址http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyparsing
安装完又出现错误:
No module name six
需要安装scipy
7、安装scipy,下载地址见链接4。
然后把C:Python27Libsite-packagesscipylib中的six.py six.pyc six.pyo三个文件拷贝到C:Python27Libsite-packages目录下。
再在IDLE(Python GUI)中输入import matplotlib.pyplot as plt便可以解决啦!
8、输入以下代码不报错:
import matplotlib
import numpy
import scipy
import pyparsing
import matplotlib.pyplot as plt
9、验证一个简单的例子
import matplotlib.pyplot as plt
plt,plot([1,2,3])
plt.ylabel('some numbers')
plt.show()
10、其他有用的链接:
example: http://matplotlib.org/examples/index.html gallery:http://matplotlib.org/gallery.html
http://blog.csdn.net/pzy20062141/article/details/48730985
file resources
win10 64位操作系统
1)Python2.7 64位 环境变量path
python安装路径
2)pip-8.1.1 (source) 命令:python setup.py install
环境变量path
D:\sftwre_path\python27\Scripts
3)安装完pip后所有的wheel文件都用这个命令安装,图上所需的wheel文件都可以从链接4找到,顺序可以numpy,dateutil,pyparsing,six,scipy,最后matplotlib
命令:
pip install wheel
pip install *.wheel
4)用代码测试
这是之前win7 64位安装查找的资料(转载)
链接1 http://blog.sciencenet.cn/blog-579770-738240.html
链接2 http://www.open-open.com/lib/view/open1393488232380.html
链接3 http://blog.csdn.net/yang6464158/article/details/18546871#comments
链接4 http://www.lfd.uci.edu/~gohlke/pythonlibs/
链接123是靠谱的安装过程;此过程中需要的各种程序包都能在链接4(非官方下载,比较全)里找到。
注意:各个安装程序的版本必须一致,这里都统一用windows,64 bit,python2.7版本(据说Python3.*系列对于一些安装包不兼容,故选取了比较旧的python2.7版本)!!!!
1、python下载地址https://www.python.org/download/
2、安装与python相对应版本的Matplotlib,下载地址http://matplotlib.org/downloads.html
3、对于标准版本的Python,要使用Matplotlib,需要安装numpy模块,下载地址见链接4
4、可能还会用到msvcp.dll库,自行在网上搜一个添加到C:windowssystem32目录下。
此时如果运行 import matplotlib.pyplot as plt 可能会显示以下错误:
raise ImportError("matplotlib requiresdateutil")
ImportError: matplotlib requires dateutil
意味着需要dateutil
5、安装dateutil,下载地址http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-dateutil
此后又出现错误:
raise ImportError("matplotlib requirespyparsing")
ImportError: matplotlib requires pyparsing
意味着需要pyparsing
6、安装pyparsing,下载地址http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyparsing
安装完又出现错误:
No module name six
需要安装scipy
7、安装scipy,下载地址见链接4。
然后把C:Python27Libsite-packagesscipylib中的six.py six.pyc six.pyo三个文件拷贝到C:Python27Libsite-packages目录下。
再在IDLE(Python GUI)中输入import matplotlib.pyplot as plt便可以解决啦!
8、输入以下代码不报错:
import matplotlib
import numpy
import scipy
import pyparsing
import matplotlib.pyplot as plt
9、验证一个简单的例子
import matplotlib.pyplot as plt
plt,plot([1,2,3])
plt.ylabel('some numbers')
plt.show()
10、其他有用的链接:
example: http://matplotlib.org/examples/index.html gallery:http://matplotlib.org/gallery.html
http://blog.csdn.net/pzy20062141/article/details/48730985
相关文章推荐
- python抓取网站URL小工具
- python web开发框架django安装和测试
- @修饰符--python中的装饰器
- Python 脚本学习笔记(五)集中式病毒扫描,端口扫描以及分段数据库操作
- Python 脚本学习笔记(五)集中式病毒扫描,端口扫描以及分段数据库操作
- python 抓取美女图片
- 【Python】【解决】UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 1: ordinal not in r
- python中格式化字符串
- Python-other-1
- Python 初识Pandas- Python Data Analysis Library
- python 用户登录, 锁定。多用户
- 利用Python的科学计算包scipy画Quantile-Quantile图
- Django+python+BeautifulSoup垂直搜索爬虫
- python-requests快速上手
- 用Python学习统计学基础-5
- python [1:3]
- Python 遍历文件夹中的指定类型文件
- python基础语法(4)
- python基础语法(3)
- python基础语法(2)