在获得O'Reilly书之前,我正在玩Python的熊猫包。当我在成功安装xcode和EPDFree后尝试安装熊猫时,使用easy_install的熊猫安装提出了很多警告,并且当我测试了解熊猫是否工作时,它显然不是。我试图删除并重新安装熊猫和Numpy几次,但没有成功。我对此很陌生,所以我一定做错了什么。在Mac OSX上安装熊猫和numpy的问题
这是我所得到的,当我运行Python和尝试导入熊猫和numpy的:
$ python
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named numpy
>>> import pandas
No module named numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/pandas-0.12.0-py2.7-macosx-10.8-intel.egg/pandas/__init__.py", line 6, in <module>
from . import hashtable, tslib, lib
File "numpy.pxd", line 157, in init pandas.hashtable (pandas/hashtable.c:19547)
ImportError: No module named numpy
有没有一种方法,我可以解决这个问题或者与整个安装重新开始吗?
下面是一些更多的信息,当我尝试安装熊猫和numpy的:
$ sudo easy_install pandas
Password:
Searching for pandas
Best match: pandas 0.12.0
Processing pandas-0.12.0-py2.7-macosx-10.8-intel.egg
pandas 0.12.0 is already the active version in easy-install.pth
Using /Library/Python/2.7/site-packages/pandas-0.12.0-py2.7-macosx-10.8-intel.egg
Processing dependencies for pandas
Finished processing dependencies for pandas
$ sudo easy_install numpy
Searching for numpy
Best match: numpy 1.6.1
numpy 1.6.1 is already the active version in easy-install.pth
Using /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
Processing dependencies for numpy
Finished processing dependencies for numpy