Haraball.no

Error: command 'clang' failed with exit status 1

2016-09-27

When installing skbio on MacOS for Python 3.5.1 I got the following error

...
    skbio/stats/__subsample.c:250:10: fatal error: 'numpy/arrayobject.h' file not found
    #include "numpy/arrayobject.h"
             ^
    1 error generated.
    error: command 'clang' failed with exit status 1

To fix this I run the following command:

export CFLAGS="-I /Users/username/projectname/.venv/lib/python3.5/site-packages/numpy/core/include $CFLAGS"

where .venv is the name of my virtual environment.