在Mac OSX 10.9上通过Homebrew安装numpy时出错
我在通过homebrew安装numpy的时候遇到了以下错误:
$ pip install numpy
File "numpy/core/setup.py", line 42, in check_types
out = check_types(*a, **kw)
File "numpy/core/setup.py", line 288, in check_types
"Cannot compile 'Python.h'. Perhaps you need to "\
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
我找不到任何能解决这个问题的方法。我已经安装了XCode和python 2.7.6(通过homebrew安装的)。brew doctor显示一切正常。
1 个回答
3
我通过以下方式卸载了Python:
brew uninstall python
然后重新安装Python:
brew install python
还安装了setuptools和pip:
pip install --upgrade setuptools
pip install --upgrade pip
现在,
pip install numpy
成功安装完成