2014-05-13 119 views
0

嘗試在IPython筆記本環境中以np運行導入numpy時出現一些錯誤。我認爲Enthought Canopy軟件包是borked的,任何提示都將非常感謝!向IPython筆記本導入numpy的問題

ImportError        Traceback (most recent call last) 
<ipython-input-2-140a5caba752> in <module>() 
----> 1 import numpy as np 
     2 import scipy 
     3 import matplotlib as mpl 

/Users/iMacHome/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/__init__.pyc in <module>() 
    141   return loader(*packages, **options) 
    142 
--> 143  import add_newdocs 
    144  __all__ = ['add_newdocs'] 
    145 

/Users/iMacHome/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/add_newdocs.py in <module>() 
     7 #  core/fromnumeric.py, core/defmatrix.py up-to-date. 
     8 
----> 9 from numpy.lib import add_newdoc 
    10 
    11 ############################################################################### 
+0

重新安裝?這是完整的後面跟蹤?它看起來對我不利。 – tacaswell

回答

1

通過刪除/Users/iMacHome/Library/Enthought/,並重新啓動雨棚GUI重置您的雨棚的Python用戶環境(重新初始化環境),然後再試一次。如果沒有這樣做,請考慮您與另一個Python安裝交叉鏈接的可能性。要測試這個,ipython中的sys.prefixsys.path是什麼?