gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-03 14:53:57 25 4
gpt4 key购买 nike

导入wx.lib.plot

当我尝试导入 wx.lib.py 时,出现以下错误:

ImportError: NumPy not found.

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 (Link) for information on downloading source or binaries.

但是,我之前已经在命令提示符下安装了它,它显示为

已满足要求:/Users/[我的名字]/anaconda/lib/python2.7/site-packages中的numpy

有谁知道这可能是什么原因造成的吗?

最佳答案

检查此问题板: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

关于python - 导入wx.lib.py时为"Import Error: NumPy not found",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45721030/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com