解决两个问题:

(1)Import Error: No module named numpy

(2)Python version 2.7 required, which was not found in the registry

(1)这种错误是因为没有安装numpy科学计算库,因此需要安装此模块。

  1. 首先下载正确的exe安装文件:numpy-MKL-1.8.0.win-amd64-py2.7.exe。

  2. 接着我们双加打开安装文件,点击运行按钮

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

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

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

  6. 打开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科学计算模块的更多相关文章

  1. windows下python安装Numpy和Scipy模块

    安装 numpy: 去 http://sourceforge.net/projects/numpy/files/latest/download?source=files 下载相应的exe安装文件. 安 ...

  2. ubuntu安装Python环境以及科学计算环境

    参考:http://blog.csdn.net/a1311543690/article/details/ 1.sudo apt-get install python-pip pip是Python的一个 ...

  3. Python的工具包[0] -> numpy科学计算 -> numpy 库及使用总结

    NumPy 目录 关于 numpy numpy 库 numpy 基本操作 numpy 复制操作 numpy 计算 numpy 常用函数 1 关于numpy / About numpy NumPy系统是 ...

  4. windows下python安装Numpy、Scipy、matplotlib模块(转载)

    python下载链接     Numpy下载链接 python中Numpy包的安装及使用 Numpy包的安装 准备工作 Python安装 pip安装 将pip所在的文件夹添加到环境变量path路径中 ...

  5. [python] 安装numpy+scipy+matlotlib+scikit-learn及问题解决

    这篇文章主要讲述Python如何安装Numpy.Scipy.Matlotlib.Scikit-learn等库的过程及遇到的问题解决方法.最近安装这个真是一把泪啊,各种不兼容问题和报错,希望文章对你有所 ...

  6. Windows下Python安装numpy+mkl,Scipy和statsmodels

    最近做时间序列分析需要用到Python中的statsmodels,但是安装过程中遇到很头疼的问题,Google.Stackover各种都没有找到合适的解决办法,而且貌似还有很多同学也在吐槽Window ...

  7. python安装numpy和pandas

    最近要对一系列数据做同比比较,需要用到numpy和pandas来计算,不过使用python安装numpy和pandas因为linux环境没有外网遇到了很多问题就记下来了.首要条件,python版本必须 ...

  8. [转] python安装numpy和pandas

    最近要对一系列数据做同比比较,需要用到numpy和pandas来计算,不过使用python安装numpy和pandas因为linux环境没有外网遇到了很多问题就记下来了.首要条件,python版本必须 ...

  9. 【转载】python安装numpy和pandas

    转载:原文地址 http://www.cnblogs.com/lxmhhy/p/6029465.html 最近要对一系列数据做同比比较,需要用到numpy和pandas来计算,不过使用python安装 ...

随机推荐

  1. mac gcc 编译错误 基础问题

    mac gcc  Undefined symbols for architecture x86_64 "std::__1: // Undefined symbols for architec ...

  2. js 多选题选项内容显示在标题下

    <body><div class="page-container"> <div class="view-container"> ...

  3. JAVA NIO系列(三) Buffer 解读

    缓冲区分类 NIO中的buffer用于和通道交互,数据是从通道读入缓冲区,从缓冲区中写入通道的.Buffer就像一个数组,可以保存多个类型相同的数据.每种基本数据类型都有对应的Buffer类: 缓冲区 ...

  4. PHYLIP linux安装

    PHYLIP的安装: http://download.chinaunix.net/download.php?id=29483&ResourceID=8135下载 gunzip phylip-3 ...

  5. span和div的区别

    <span> 在CSS定义中属于一个行内元素,在行内定义一个区域,也就是一行内可以被 <span> 划分成好几个区域,从而实现某种特定效果. <span> 本身没有 ...

  6. PostgreSQL Replication之第十二章 与Postgres-XC一起工作(3)

    12.3 配置一个简单的集群 在本章中,我们要建立一个由三个数据节点组成的集群.一个协调节点,以及管理集群的全局事务管理节点.对于每个组件,我们必须创建一个目录: hs@vm:~/data$ ls - ...

  7. 快速搭建企业subversion

    快速搭建企业subversion 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 我们公司用的版本控制控制系统就是subversion(简称SVN),不得不说这是一款比较好使的管理工 ...

  8. jquery ajax 个人总结

    jquery : 在获取对象的时候,不要用dem的与jquery的混合写法,有的时候 用js获取到的对象 没有JQUERY对应的方法  会报一些不知道的错误.(即如果要使用jquery 就使用jque ...

  9. ruby的在ubuntu上的安装

    apt (Debian or Ubuntu) Debian GNU/Linux and Ubuntu use the apt package manager. You can use it like ...

  10. struts局部、全局类型转换器

    第01步:编写bean package com.self.bean; import java.util.Date; public class User { private Date birthday ...