我想在 Mac OS X Lion 上安装 numpy、pylab、scipy 和 ipython。我安装了以下内容:
python-2.7.3-macosx10.6.dmg,
numpy-1.6.1-py2.7-python.org-macosx10.6.dmg,
matplotlib-1.1.1-py2.7-python.org-macosx10.6.dmg,
scipy-0.11.0-py2.7-python.org-macosx10.6.dmg
并获得以下消息:
/var/folders/hm/bv37669175j2dvn_f87t4zcc0000gn/T/Cleanup\ At\ Startup/statistics_intro-373260522.639.py.command ; exit;
RuntimeError: module compiled against API version 6 but this version of numpy is 4
Traceback (most recent call last):
...
from transforms import Bbox, IdentityTransform, TransformedBbox, TransformedPath
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/transforms.py", line 34, in <module>
from matplotlib._path import affine_transform
ImportError: numpy.core.multiarray failed to import
许多用户似乎能够通过删除 python 并重新安装来让 numpy 工作。我在/user/bin
and中这样做了/Library
,但我仍然收到错误消息。