Python 安装matplotlib,six,dateutil,pyparsing 完整过程
来源:互联网 发布:阿里云盒子刷安卓系统 编辑:程序博客网 时间:2024/05/29 02:22
最近在学习Python,在安装使用matplotlib时出现不少问题。今天看到这篇文章,参考解决了所有问题,在此转载此文以帮助更多的初学者。
原文地址:http://www.ithao123.cn/content-802487.html
因为matplotlib 需要依赖许多其他科学计算的第三方库,需要一个一个的安装了。。
1, 安装matplotlib
官网直接下载:http://matplotlib.sourceforge.net/
我找了一个.exe的安装完毕之后, 直接 import matplotlib,
报错如下:
之后就是安装 six了
2, 安装six
官网下载:http://www.pythonhosted.org/six/
我下载的是 six-1.8.0 的源码包, 解压之后,到解压目录,命令行执行 直接 python setup.py install 就可以安装完成
之后 再次import matplotlib 还是缺少库: dateutil
3, 安装dateutil
官网下载:https://pypi.python.org/pypi/python-dateutil/1.4.1
我下载的是 python-dateutil-2.3 源码安装 同样到解压目录下,执行 python setup.py install 同样可以安装成功,
继续执行:import matplotlib ;依旧报错: 缺少 pyparsing库
4, 安装pyparsing
官网下载 http://pyparsing.wikispaces.com/Download+and+Installation
安装方式与前面一样 解压之后, 直接 python setup.py install ,安装完成====
仍然 import matplotlib,还是缺少: numpy:
5, 安装numpy
下载http://www.numpy.org/
我直接下载的 numpy 1.9.1, 老方式安装,结果在安装的时候,报错了:
第一次碰到这个错误,在网上查资料之后, 发现是自己的C++/C 的编译器VC设置问题,
首先到 Python 目录下,找到 Lib-->distutilsmsvc9compiler.py 这个文件:
需要修改:
vc_env = query_vcvarsall(VERSION, plat_spec)
这一行,如果你安装了 VS2012 ,就将VERSION直接改为11.0 如果是VS2013 就改为12.0
之后,在找到:
mfinfo = self.manifest_get_embed_info(target_desc, ld_args)
这一行,直接改为:
mfinfo = None
再次执行 python setup.py install 安装numpy 成功:
再次执行 import matplotlib OK!
- Python 安装matplotlib,six,dateutil,pyparsing 完整过程
- Python 安装matplotlib,six,dateutil,pyparsing 完整过程
- Python 安装matplotlib,six,dateutil,pyparsing 完整过程
- Python matplotlib安装及所需要的 numpy dateutil pyparsing six的下载地址
- Python安装包括Numpy、matplotlib、dateutil、pyparsing、scipy
- Python Matplotlib的安装使用及Scipy,numpy,dateutil,pyparsing的安装
- 机器学习相关库在Python中的配置:numpy+matplotlib+scipy+dateutil+pyparsing
- Error processing package python-appindicator/cycler/dateutil/pyparsing/tz/matplotlib (--configure)
- python2.7的Numpy和Matplotlib即依赖库dateutil和pyparsing的安装
- python matplotlib相关 dateutil
- Python下的scipy,matplotlib,Numpy,six安装
- Python导入matplotlib错误提示ImportError: matplotlib requires pyparsing
- Python教程:windows下matplotlib安装错误(ImportError: matplotlib requires dateutil)
- Python-Matplotlib安装过程简述
- python 常用库收集 pyparse,matplotlib,dateutil
- win7下安装matplotlib+six+pysparsing
- Python配置matplotlib--no module named six matplotlib
- python下安装numpy、matplotlib、scipy过程
- Fragment生命周期2
- 指针和引用的区别
- 错误的结果2......VC/bin/cl.exe返回的最终解决方案
- 你真的需要一个小例子来了解一些事情!
- UITableView默认选中第一个cell
- Python 安装matplotlib,six,dateutil,pyparsing 完整过程
- 项目:片刻 DAY1 搭建框架结构
- iOS改变状态栏的字体颜色
- 当我开始爱自己
- Github入门
- Android开发学习解决程序运行就出错的一个问题
- Uncaught SyntaxError: Failed to execute 'querySelectorAll' on 'Element': '#00' is not a valid select
- 如何使用MySQL处理数据——增删改查
- iOS开发系列--音频播放、录音、视频播放、拍照、视频录制