python安装numpy科学计算模块
解决两个问题:
(1)Import Error: No module named numpy
(2)Python version 2.7 required, which was not found in the registry
(1)这种错误是因为没有安装numpy科学计算库,因此需要安装此模块。
首先下载正确的exe安装文件:numpy-MKL-1.8.0.win-amd64-py2.7.exe。
接着我们双加打开安装文件,点击运行按钮

安装过程很简单,点击下一步

在第一步,如果你看到自己的python的版本号和安装路径,说明你的numpy下载的版本是正确的,点击下一步

一直点击下一步即可完成安装


打开python,我们输入import numpy,如果没有提示错误信息,就说明我们安装完成
注意:在安装的过程中,可能会出现:
Python version 2.7 required, which was not found in the registry
这是因为python安装时没有写入到注册表中:
解决方法为:
写一个如下脚本,可以命名为:PythonRegister.py:
# script to register Python 2.0 or later for use with win32all
# and other extensions that require Python registry settings
#
# written by Joakim Loew for Secret Labs AB / PythonWare
#
# source:
# http://www.pythonware.com/products/works/articles/regpy20.htm
#
# modified by Valentine Gogichashvili as described in http://www.mail-archive.com/distutils-sig@python.org/msg10512.html import sys from _winreg import * # tweak as necessary
version = sys.version[:3]
installpath = sys.prefix regpath = "SOFTWARE\\Python\\Pythoncore\\%s\\" % (version)
installkey = "InstallPath"
pythonkey = "PythonPath"
pythonpath = "%s;%s\\Lib\\;%s\\DLLs\\" % (
installpath, installpath, installpath
) def RegisterPy():
try:
reg = OpenKey(HKEY_CURRENT_USER, regpath)
except EnvironmentError as e:
try:
reg = CreateKey(HKEY_CURRENT_USER, regpath)
SetValue(reg, installkey, REG_SZ, installpath)
SetValue(reg, pythonkey, REG_SZ, pythonpath)
CloseKey(reg)
except:
print "*** Unable to register!"
return
print "--- Python", version, "is now registered!"
return
if (QueryValue(reg, installkey) == installpath and
QueryValue(reg, pythonkey) == pythonpath):
CloseKey(reg)
print "=== Python", version, "is already registered!"
return
CloseKey(reg)
print "*** Unable to register!"
print "*** You probably have another Python installation!" if __name__ == "__main__":
RegisterPy()
然后在CMD中执行:
启动命令切换到PythonRegister.py文件目录下执行

重新安装PIL,错误解决,安装成功。
此时就可以重新安装numpy库。
python安装numpy科学计算模块的更多相关文章
- windows下python安装Numpy和Scipy模块
安装 numpy: 去 http://sourceforge.net/projects/numpy/files/latest/download?source=files 下载相应的exe安装文件. 安 ...
- ubuntu安装Python环境以及科学计算环境
参考:http://blog.csdn.net/a1311543690/article/details/ 1.sudo apt-get install python-pip pip是Python的一个 ...
- Python的工具包[0] -> numpy科学计算 -> numpy 库及使用总结
NumPy 目录 关于 numpy numpy 库 numpy 基本操作 numpy 复制操作 numpy 计算 numpy 常用函数 1 关于numpy / About numpy NumPy系统是 ...
- windows下python安装Numpy、Scipy、matplotlib模块(转载)
python下载链接 Numpy下载链接 python中Numpy包的安装及使用 Numpy包的安装 准备工作 Python安装 pip安装 将pip所在的文件夹添加到环境变量path路径中 ...
- [python] 安装numpy+scipy+matlotlib+scikit-learn及问题解决
这篇文章主要讲述Python如何安装Numpy.Scipy.Matlotlib.Scikit-learn等库的过程及遇到的问题解决方法.最近安装这个真是一把泪啊,各种不兼容问题和报错,希望文章对你有所 ...
- Windows下Python安装numpy+mkl,Scipy和statsmodels
最近做时间序列分析需要用到Python中的statsmodels,但是安装过程中遇到很头疼的问题,Google.Stackover各种都没有找到合适的解决办法,而且貌似还有很多同学也在吐槽Window ...
- python安装numpy和pandas
最近要对一系列数据做同比比较,需要用到numpy和pandas来计算,不过使用python安装numpy和pandas因为linux环境没有外网遇到了很多问题就记下来了.首要条件,python版本必须 ...
- [转] python安装numpy和pandas
最近要对一系列数据做同比比较,需要用到numpy和pandas来计算,不过使用python安装numpy和pandas因为linux环境没有外网遇到了很多问题就记下来了.首要条件,python版本必须 ...
- 【转载】python安装numpy和pandas
转载:原文地址 http://www.cnblogs.com/lxmhhy/p/6029465.html 最近要对一系列数据做同比比较,需要用到numpy和pandas来计算,不过使用python安装 ...
随机推荐
- devexpress13学习系列(一)PDFViewer(2)
DevExpress.XtraPdfViewer Namespace 该命名空间下,保留着pdfviewer组件需要的类,主要有: Class Description PdfCurrentPa ...
- As3 Anchored Container 代码设置锚点旋转
原文地址:http://jamesvango.co.uk/blog/?p=136
- Android自定义ScrollView实现一键置顶功能
效果图如下: (ps:动态图有太大了,上传不了,就给大家口述一下要实现的功能吧) 要实现的功能:当ScrollView向上滑动超过一定距离后,就渐变的出现一个置顶的按钮,当滑动距离小于我们指定的距离时 ...
- 存储区更新、插入或删除语句影响到了意外的行数(0)。实体在加载后可能被修改或删除。刷新 ObjectStateManager 项。
在用asp.net MVC3 的MusicStore时候 Edit某个数据项时提示下面的错误: 存储区更新.插入或删除语句影响到了意外的行数(0).实体在加载后可能被修改或删除.刷新 ObjectSt ...
- -XX:+PrintHeapAtGC 每次一次GC后,都打印堆信息
-XX:+PrintHeapAtGC每次一次GC后,都打印堆信息 {Heap before GC invocations=0 (full 0): def new generation total ...
- 使用php模拟post的几种方法
<?phpfunction file_get_contents_post($url,$post){$options=array('http'=>array('method'=>'PO ...
- JetBrains WebStorm 8 注册码
UserName:William===== LICENSE BEGIN =====45550-1204201000001SzFN0n1bPII7FnAxnt0DDOPJAINauvJkeVJBuE5b ...
- C#下调用C++ SDK的编码常识
一组编码规范,通过C#调用C++ 自动封装的C# SDK,会发现面向对象思想的重要性. C++ SDK可以使用自动封装工具转换成C# SDK.但需要遵守如下规则: 1.如果需要对C#对象进行判断,则分 ...
- Workspace Cloning / Sharing in Jenkins
http://lwandersonmusings.blogspot.com/2011/06/workspace-cloning-sharing-in-hudson.html What's insi ...
- 【NOIP模拟赛】正方形大阵
正方形大阵 [问题描述] [输入格式] 第一行一个正整数n代表询问次数. 接下来n行每行一个不超过八位的小数k代表一组询问. [输出格式] 输出共n行,代表每次询问的答案:如果有无数个交点 ...