Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install misses numpy include dirs #1

Open
jorenretel opened this issue Aug 23, 2017 · 1 comment
Open

pip install misses numpy include dirs #1

jorenretel opened this issue Aug 23, 2017 · 1 comment

Comments

@jorenretel
Copy link

jorenretel commented Aug 23, 2017

I just installed this library. There was a small tweak I had to make to make this possible though. When I tried to install it from PyPi using pip (pip install fabia) it gave the following error:

    fabia/_fabia.c:450:31: fatal error: numpy/arrayobject.h: No such file or directory
     #include "numpy/arrayobject.h"
                                   ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1

I looked into the setup.py and saw that you recently made some changes. I replaced line 51

```python
ext_modules = [Extension("fabia._fabia", ["fabia/_fabia.c"])],

by

ext_modules = [Extension("fabia._fabia", ["fabia/_fabia.c"], include_dirs=[np.get_include()])],

I checked whether the package like this was pip installable by running python setup.py sdist and subsequently running pip install on the locally created tar.gz. I think 'include_dirs=[np.get_include()]' is still necessary.

I was using python 3.6.2 and a conda environment.

@Alro10
Copy link

Alro10 commented Oct 27, 2018

Hi! I created a virtualenv for python 2.7, also you would create virtualenv for python 3.5 , 3.6 or conda. After that, use this requirements.txt file.
numpy>=1.12
scipy>=0.19
sklearn

Finally, run: pip install -r requirements.txt

This worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants