2017-08-16 72 views
1

進口wx.lib.plot導入錯誤:與NumPy找不到

當我嘗試導入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 (http://numpy.scipy.org) for information on downloading source or binaries.

不過,我以前安裝它在命令提示符,它顯示爲

要求已經滿足:numpy的在/用戶/ [我的名字] /anaconda/lib/python2.7/site-packages

有誰知道什麼可能會造成這個?

回答

1

檢查這個問題主板:https://github.com/ContinuumIO/anaconda-issues/issues/565

的錯誤是因爲wxPython的使用已在numpy的1.9被刪除numpy.oldnumeric:

# 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 
+0

這是一個可怕的錯誤消息:) – Wyrmwood

+0

完全同意。它不具有信息性,誤導性,並向錯誤的方向發送用戶。老實說,我停止與WX合作。我現在只是在Jupyter工作並使用小部件!該社區非常活躍並且有很多功能。 –

+2

只有古代版本的wxPython需要古代版本的numpy,'wx.lib.plot'自此更新了幾次。 – RobinDunn