Numpy Can';在Time Machine还原后找不到Python模块

Numpy Can';在Time Machine还原后找不到Python模块,numpy,python-2.7,osx-mountain-lion,pip,timemachine,Numpy,Python 2.7,Osx Mountain Lion,Pip,Timemachine,最近,我执行了OSX Mountain Lion的干净安装,并从Time Machine备份中恢复了我的系统。当我尝试使用python时,它无法找到我在擦除操作系统之前安装的大多数模块。系统上似乎不再有Xcode命令行工具 我重新安装了Xcode命令行工具和pip(使用easy_install),并开始重新安装我使用的模块,从numpy开始。然而,pip表示已经安装了: Requirement already satisfied (use --upgrade to upgrade): numpy

最近,我执行了OSX Mountain Lion的干净安装,并从Time Machine备份中恢复了我的系统。当我尝试使用python时,它无法找到我在擦除操作系统之前安装的大多数模块。系统上似乎不再有Xcode命令行工具

我重新安装了Xcode命令行工具和pip(使用easy_install),并开始重新安装我使用的模块,从numpy开始。然而,pip表示已经安装了:

Requirement already satisfied (use --upgrade to upgrade): numpy in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
但是,在Python的CLI中,仍然找不到numpy:

    Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43) 
    [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] 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
python2.7.3(v2.7.3:70274d53c1dd,2012年4月9日,20:52:43)
[GCC 4.2.1(苹果公司建造5666)(dot 3)]关于达尔文
有关详细信息,请键入“帮助”、“版权”、“信用证”或“许可证”。
>>>进口numpy
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
ImportError:没有名为numpy的模块
我已经尝试安装了一些其他模块。当我用pip安装ujson时,一切都很顺利,python发现它没有问题。然而,当我试图用pip安装matplotlib时,clang抛出了一个错误,安装失败。我想问题可能是matplotlib依赖于numpy,但我不知道

In file included from src/ft2font.cpp:3:

src/ft2font.h:16:10: fatal error: 'ft2build.h' file not found

#include <ft2build.h>

         ^

1 error generated.

error: command 'clang' failed with exit status 1

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build/matplotlib/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-lqNcmF-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build/matplotlib`
src/ft2font.cpp中包含的文件中的
:3:
src/ft2font.h:16:10:致命错误:“未找到ft2build.h”文件
#包括
^
生成1个错误。
错误:命令“clang”失败,退出状态为1
----------------------------------------
Command/usr/bin/python-c“导入setuptools;uuuuu文件uuu=”/tmp/pip build/matplotlib/setup.py';exec(编译(打开(uu文件uuu).read().replace('\r\n','\n'),uu文件uuu,'exec'))安装--record/tmp/pip/lqNcmF record/install-record.txt--外部管理的单一版本失败,错误代码为/tmp/pip-build/matplotlib中的1`

对如何解决这个问题有什么建议吗?我应该卸载另一个版本的numpy,还是您认为这是一个更深层次的问题?

我建议删除/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/Python中的numpy文件,然后重新安装numpy。即使文件存在,库似乎也不再正确链接。

更新:我在/System/Library/…下卸载了numpy版本。。。现在情况似乎很好。这会导致我的电脑出现问题吗?