MattShannon/bandmat

setup fail

zhang-teng opened this issue · 9 comments

It appears that I can't install it with neither pip or setup.py method.So Here comes my case:
I'm using a OS X 10.11.6 System with python 2.7 installed,In case of some side effects I choose to install it within the virtulenv environment.
The error:
bandmat/full.c:237:10: fatal error: 'numpy/arrayobject.h' file not found
#include "numpy/arrayobject.h"
I've got some ideas about that the problem comes up because it can not locate the 'numpy/arrayobject.h' which actually exist at '/include/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h'

There is an open pull request active that should solve this issue. Since the master of this repo is taking his time. Try copy pasting that code and running setup.py install manually. In extension models include_dirs=[numpy.get_include()] is missing and to include that you need to import numpy somwhere in setup.py.

thanks. I've solve by adding some Variable to gcc but it seems that the method open pull shows would work much easier.
It seems that you are working on some TTS system which I've been working on it for a while too.
I would be very glad to talk about it.

i got the same error (im using conda:)
bandmat/full.c:237:10: fatal error: 'numpy/arrayobject.h' file not found
#include "numpy/arrayobject.h"
how to solve this problem ? give me some detail information? thanks

i added the import numpy to setup.py but still get this error

You need to also add inclusion in extension modules both for dev mode and else. It should look something like:

ext_modules = [
Extension('.'.join(loc), [os.path.join(*loc)+'.pyx'],
extra_compile_args=['-Wno-unused-but-set-variable', '-O3'],
include_dirs=[numpy.get_include()])
for loc in cython_locs
]

r9y9 commented

One-line:

pip install git+https://github.com/wuaalb/bandmat

Sorry for the extremely slow reply! I've now updated the github and PyPI versions. @zhang-teng, @SirPounce, @mataym, I'd be very grateful if you'd let me know if this fixes the issues you were experiencing. I'll try to respond in a more timely fashion in future.

Please re-open if this is still an issue.

One-line:

pip install git+https://github.com/wuaalb/bandmat

This worked for me, thanks! Using Mac with macOS Mojave Version 10.14.3