hlin117 / mdlp-discretization

An implementation of the minimum description length principal expert binning algorithm by Usama Fayyad
BSD 3-Clause "New" or "Revised" License
101 stars 53 forks source link

installation - can't build Cython '_mdlp' extension #17

Closed tinastefaniewenzel closed 6 years ago

tinastefaniewenzel commented 7 years ago

I ran make on MacOSX-10.12.5 (Sierra) and I get this error

python setup.py build_ext --inplace
Please put "# distutils: language=c++" in your .pyx or .pxd file(s)
running build_ext
building '_mdlp' extension
clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mdlp.cpp -o build/temp.macosx-10.11-x86_64-2.7/_mdlp.o
_mdlp.cpp:513:10: fatal error: 'numpy/arrayobject.h' file not found
#include "numpy/arrayobject.h"
         ^
1 error generated.
error: command 'clang' failed with exit status 1
make: *** [all] Error 1

I tried downgrading to numpy v1.9.2 as specified in the requirements.txt, but the error persists.

hlin117 commented 6 years ago

Hi @tinastefaniewenzel . Did you do this in the virtual environment?

I'm using Sierra 10.12.6, and I just ran these commands to set up the environment.

$ virtualenv env
$ source env/bin/activate
$ pip install -r requirements.txt
$ make 
hlin117 commented 6 years ago

Closing because old. Try recloning the most recent master, and install. Thanks!