سؤال

I have the follow error when installing numpy via homebrew:

$ 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.

I have not found any solution that works me. I have installed XCode, python 2.7.6 (via homebrew). brew doctor says that everything is ok.

هل كانت مفيدة؟

المحلول

I uninstall python via:

brew uninstall python

reinstall python:

brew install python

and setuptools and pip:

pip install --upgrade setuptools
pip install --upgrade pip

now,

pip install numpy

Successfully installed

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top