我'我目前正在使用Canopy作为其科学包的数量,但是我使用来自bash shell的Ipython shell来交互式编写。当我尝试以交互方式导入numpy或scipy时,我收到以下错误报告:
In [4]: import scipy
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-4-4dc45f4c0083> in <module>()
----> 1 import scipy
/Users/nick/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/scipy/__init__.py in <module>()
68 __all__ = ['test']
69
---> 70 from numpy import show_config as show_numpy_config
71 if show_numpy_config is None:
72 raise ImportError("Cannot import scipy when running from numpy source directory.")
/Users/nick/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/__init__.py in <module>()
166 return loader(*packages, **options)
167
--> 168 from . import add_newdocs
169 __all__ = ['add_newdocs', 'ModuleDeprecationWarning']
170
/Users/nick/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/add_newdocs.py in <module>()
11 from __future__ import division, absolute_import, print_function
12
---> 13 from numpy.lib import add_newdoc
14
15 ###############################################################################
/Users/nick/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/lib/__init__.py in <module>()
15 from .ufunclike import *
16
---> 17 from . import scimath as emath
18 from .polynomial import *
19 #import convertcode
ImportError: cannot import name scimath
然而,当我从冠层ipython提示导入时,一切正常。 有解决方法吗? Canopy版本为1.3,操作系统为OSX 10.9.2。
谢谢, 尼科斯