我正在尝试通过在 ipython 上导入 AplPy 在 OSX 上启动它。我使用 pip 安装了 AplPy,然后在终端中输入:
ipython --pylab
import aplpy
但是我只得到以下输出:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/kernel/_
_init__.py:13: ShimWarning: The `IPython.kernel` package has been deprecated.
You should import from ipykernel or jupyter_client instead.
"You should import from ipykernel or jupyter_client instead.", ShimWarning)
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-3-429eb0b27113> in <module>()
----> 1 import aplpy
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site- packages/aplpy/__init__.py in <module>()
12 if not _ASTROPY_SETUP_:
13
---> 14 from .core import FITSFigure
15 from .rgb import make_rgb_image, make_rgb_cube
16
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site- packages/aplpy/core.py in <module>()
12
13 import matplotlib.pyplot as mpl
---> 14 import mpl_toolkits.axes_grid.parasite_axes as mpltk
15 from astropy.extern import six
16
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mpl_toolkits/axes_grid/__init__.py in <module>()
2 unicode_literals)
3
----> 4 from matplotlib.externals import six
5
6 from . import axes_size as Size
ImportError: No module named externals
我在网上的任何地方都找不到可能丢失的名为 externals 的模块,还有其他人知道发生了什么吗?