导入 wx.lib.py 时"Import Error: NumPy not found"



import wx.lib.plot

当我尝试导入 wx.lib.py 时,它给了我以下错误:

导入错误: 找不到数字。

此模块需要无法导入的 NumPy 模块。 它可能没有安装(它不是标准Python发行版的一部分(。有关下载源文件或二进制文件的信息,请参阅 Numeric Python 站点(链接(。

但是,我以前在命令提示符上安装了它,它显示为

已经满足的要求:numpy in/Users/[my name]/anaconda/lib/python2.7/site-packages

有谁知道是什么原因造成的?

查看此问题板:https://github.com/ContinuumIO/anaconda-issues/issues/565

发生此错误是因为 wxpython 使用了 numpy.oldnumeric 在 numpy 1.9 中删除:

# Needs NumPy 
try:
import numpy.oldnumeric as _Numeric 
except:
msg= """
This module requires the NumPy module, which could not be
imported.  It probably is not installed (it's not part of the
standard Python distribution). See the Numeric Python site
(http://numpy.scipy.org) for information on downloading source or
binaries."""
raise ImportError, "NumPy not found.n" + msg

相关内容

最新更新