Windows10 64位 Python2.7 Matplotlib安装
为了安装Matplotlib 百度了一大堆,也下载了一大堆安装包,结果还是报错ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。
后来直接从官网看怎么安装http://matplotlib.org/users/installing.html
For standard Python installations you will also need to install compatible versions of setuptools, numpy, python-dateutil, pytz, pyparsing, and cycler in addition to matplotlib.
然后发现好像可以直接用Powershell利用内置的pip(python包管理工具,详情可参见https://pip.pypa.io/en/stable/)
首先是更新一下pip (确保pip能使用)
然后将setuptools, numpy, python-dateutil, pytz, pyparsing, cycler,matplotlib分别代替最后的pip并运行
PS C:\Users\wenchaoz> python -m pip install --upgrade pip
Collecting pip
Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB)
100% |████████████████████████████████| 1.2MB 315kB/s
Installing collected packages: pip
Found existing installation: pip 7.1.2
Uninstalling pip-7.1.2:
Successfully uninstalled pip-7.1.2
Successfully installed pip-8.1.2
PS C:\Users\wenchaoz> python -m pip install --upgrade numpy
Collecting numpy
Downloading numpy-1.11.1-cp27-none-win_amd64.whl (7.4MB)
100% |████████████████████████████████| 7.4MB 138kB/s
Installing collected packages: numpy
Found existing installation: numpy 1.9.2
DEPRECATION: Uninstalling a distutils installed project (numpy) has been deprecated and will be removed in a future
version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling numpy-1.9.2:
Successfully uninstalled numpy-1.9.2
Successfully installed numpy-1.11.1
PS C:\Users\wenchaoz> python -m pip install --upgrade pytz
Collecting pytz
Downloading pytz-2016.6.1-py2.py3-none-any.whl (481kB)
100% |████████████████████████████████| 481kB 1.2MB/s
Installing collected packages: pytz
Successfully installed pytz-2016.6.1
PS C:\Users\wenchaoz> python -m pip install --upgrade pyparsing
Collecting pyparsing
Downloading pyparsing-2.1.5-py2.py3-none-any.whl (42kB)
100% |████████████████████████████████| 51kB 122kB/s
Installing collected packages: pyparsing
Successfully installed pyparsing-2.1.5
PS C:\Users\wenchaoz> python -m pip install --upgrade cycler
Collecting cycler
Downloading cycler-0.10.0-py2.py3-none-any.whl
Requirement already up-to-date: six in c:\python27\lib\site-packages (from cycler)
Installing collected packages: cycler
Successfully installed cycler-0.10.0
PS C:\Users\wenchaoz> python -m pip install --upgrade matplotlib
Collecting matplotlib
Downloading matplotlib-1.5.1-cp27-none-win_amd64.whl (6.1MB)
100% |████████████████████████████████| 6.1MB 167kB/s
Requirement already up-to-date: cycler in c:\python27\lib\site-packages (from matplotlib)
Requirement already up-to-date: pytz in c:\python27\lib\site-packages (from matplotlib)
Requirement already up-to-date: pyparsing!=2.0.4,>=1.5.6 in c:\python27\lib\site-packages (from matplotlib)
Requirement already up-to-date: numpy>=1.6 in c:\python27\lib\site-packages (from matplotlib)
Requirement already up-to-date: python-dateutil in c:\python27\lib\site-packages (from matplotlib)
Requirement already up-to-date: six in c:\python27\lib\site-packages (from cycler->matplotlib)
Installing collected packages: matplotlib
Found existing installation: matplotlib 1.5.0
Uninstalling matplotlib-1.5.0:
Successfully uninstalled matplotlib-1.5.0
Successfully installed matplotlib-1.5.1
网上找的测试代码:
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
from matplotlib import cm fig = plt.figure()
ax = fig.gca(projection='3d')
X, Y, Z = axes3d.get_test_data(0.05)
ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3)
cset = ax.contour(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm)
cset = ax.contour(X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm)
cset = ax.contour(X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm) ax.set_xlabel('X')
ax.set_xlim(-40, 40)
ax.set_ylabel('Y')
ax.set_ylim(-40, 40)
ax.set_zlabel('Z')
ax.set_zlim(-100, 100) plt.show()
得到下图的话,恭喜你,ok了

Windows10 64位 Python2.7 Matplotlib安装的更多相关文章
- [转]windows10 64位环境下安装mysql5.7.17
今天以zip模式在windows10 64位环境下安装mysql5.7,到最后一步提示mysql服务无法启动. 安装步骤如下: 1.配置环境变量 我的电脑->属性->高级->环境变量 ...
- Windows10 64位下安装TensorFlow谷歌人工智能系统已官方原生支持
Windows10 64位下安装TensorFlow谷歌人工智能系统已官方原生支持 GitHub - tensorflow/tensorflow: Computation using data flo ...
- Windows10 64位 安装 Docker
本文主要介绍Docker在Windows下的安装.关于Docker的介绍和文档在其官网中可以找到:http://www.docker.com .安装环境:Windows10 64位. Docker引擎 ...
- Windows10 64位安装DB2数据库
安装前准备 : 系统:Windows10 64位 DB2 v9.5下载地址(迅雷):http://big3.ddooo.com/db2_93661.rar 选择安装包解压位置,并复制记住: 去到解压的 ...
- python——python3.6环境搭建(Windows10,64位)
1.python软件资源下载 1.1 打开python官网地址:https://www.python.org 1.2 根据自己电脑的设置选择下载合适的python3.6.2 1.3 此处选择windo ...
- 64位win10系统无法安装.Net framework3.5的两种解决方法
参考网站: https://blog.csdn.net/zang141588761/article/details/52177290 在Windows10中,当我们安装某些软件的时候会提示“你的电脑上 ...
- 64位win10系统无法安装.Net framework3.5的两种解决方法【转】
近日有网友反映在windows10_64位系统电脑上安装Net framework3.5,操作时总失败,怎么办呢?小编下面就介绍win10 64位系统无法安装Net framework3.5的两种解决 ...
- Windows10 64位部署odoo12开发环境
预装Windows10 64位家庭版电脑一台 2019年7月 安装Python,这里的版本选择上有个坑,不要装最新的Python 3.7.x,原因是odoo12依赖pillow 4.0.0库,而这个4 ...
- 在64位系统上不能安装Matlab notebook的解决方案
在64位系统上不能安装Matlab notebook的解决方案 过程分解 第一步:安装好matlab(附:Matalab R2015a界面) 第二步:在matlab中执行命令 >>note ...
随机推荐
- exception PLS-00403: expression 'V_END' cannot be used as an INTO-target of a SELECT/FETCH statement
exception PLS-00403: expression 'V_END' cannot be used as an INTO-target of a SELECT/FETCH stateme ...
- git工具 将源码clone到本地指定目录的三种方式
git工具 将源码clone到本地指定目录的三种方式 CreationTime--2018年7月27日15点34分 Author:Marydon 1.情景展示 运行git-bash.exe,输入命 ...
- webservice系统学习笔记10-使用jax-ws创建基于tomcat类型的容器的ws服务
1.在web-info目录下新建目录wsdl 2.在1步的目录下 新建文件user.wsdl <?xml version="1.0" encoding="UTF-8 ...
- [手把手教程][JavaWeb]优雅的SpringMvc+Mybatis整合之路
来源于:http://www.jianshu.com/p/5124eef40bf0 [手把手教程][JavaWeb]优雅的SpringMvc+Mybatis整合之路 手把手教你整合最优雅SSM框架:S ...
- linux下使用speedtest测速
Speedtest测试网络上传/下载速度还是挺不错的,windows下非常方便.Linux下也可以很方便的使用命令行speedtest来测试.speedtest是一个用Python编写的轻量级Linu ...
- Mysql 5.7 从节点配置多线程主从复制
Mysql 采用多线程进行复制是从 Mysql 5.6 开始支持的内容,但是 5.6 版本下有缺陷,虽然支持多线程,但是每个数据库只能一个线程,也就是说如果我们只有一个数据库,则主从复制时也只有一个线 ...
- Linux各主要发行版的包管理命令对照
Linux各主要发行版的包管理命令对照 Debian使用的是apt和dpkg,Gentoo则用的是emerge,Redhat的yum.Suse的zypper.Arch的pacman.Slackware ...
- HDUOJ----John
John Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submis ...
- C#将Access数据库导出为JSON
一个Access数据库包含若干首诗歌,每首诗有content.author.title.description四个字段 using System; using System.Data; using S ...
- Python的 numpy中 numpy.ravel() 和numpy.flatten()的区别和使用
两者所要实现的功能是一致的(将多维数组降为一维), 两者的区别在于返回拷贝(copy)还是返回视图(view),numpy.flatten() 返回一份拷贝,对拷贝所做的修改不会影响(reflects ...