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

Installation fails: numpy/arrayobject.h not found #4

Open
larryluer opened this issue Oct 22, 2019 · 4 comments
Open

Installation fails: numpy/arrayobject.h not found #4

larryluer opened this issue Oct 22, 2019 · 4 comments

Comments

@larryluer
Copy link

This happens on both ubuntu 18.04 and Windows 10, using both numpy 1.13.1 and 1.17.
In a Python 3.6.8 virtual environment, calling pip install phoenics fails with the following error:

phoenics/BayesianNeuralNetwork/dist evaluations.c:611:10 fatal error: numpy/arrayobject.h: no such file or directory.

On Win 10, the requested header file is in the folder
C:\Users\Larry\Documents\vscodeprojs\people.venv36\Lib\site-packages\numpy\core\include\numpy

Why is it not found by the include command?
Thanks for help, Larry

@FlorianHase
Copy link
Collaborator

Hi Larry,
thank you for reaching out and for reporting this issue. It seems as if the paths to your numpy installation are not set as expected. Running

sudo apt-get install python-dev

should set /usr/include/numpy to the correct path.
Hope this helps, but please let me know of the problem persists.
Cheers

@larryluer
Copy link
Author

larryluer commented Oct 23, 2019 via email

@TBlackmore
Copy link

Hi Florian and Larry,

I've had the same problem today on my Windows10 machine. I eventually got it to install by editing setup.py.

Changed
ext_modules = ext_modules
to
ext_modules = ext_modules, include_dirs=[numpy.get_include()]

after following advice from this stack overflow

I have yet to test if it works beyond installation but I thought I would share my small success.

Cheers,
Tim

@dking072
Copy link

I had the problem on mac when I tried pip install. Followed the instructions here and it worked:

http://notesbyanerd.com/2018/11/02/pip-install-cant-find-numpy-header/

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

4 participants