numpy/arrayobject.h: No such file or directory

1,345 views
Skip to first unread message

Prodromos Alampritis

unread,
Feb 8, 2018, 1:29:35 PM2/8/18
to Caffe Users
I am following this tutorial: https://chunml.github.io/ChunML.github.io/project/Installing-Caffe-Ubuntu/

installed CUDA 8.0.61 and cuDNN.

trying to run this command here:
make all & make test && make runtest && make pycaffe

throws:

python/caffe/_caffe.cpp:10:31: fatal error: numpy/arrayobject.h: No such file or directory
compilation terminated.
Makefile:507: recipe for target 'python/caffe/_caffe.so' failed
make: *** [python/caffe/_caffe.so] Error 1

now i tested that numpy is installed and it is there.

I have modified the Makefile.config with the following:
# We need to be able to find Python.h and numpy/arrayobject.h.
PYTHON_INCLUDE := /usr/include/python2.7 \
/usr/local/lib/python2.7/dist-packages/numpy/core/include

tried it as it and throws the one above.
Checked and saw that the arrayobject.h is nested in another folder so changed it to
/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy
but still throws the same error.(i can see the file,arrayobject.h being there)

Any thoughts on this?

Prodromos Alampritis

unread,
Feb 8, 2018, 2:33:38 PM2/8/18
to Caffe Users

SOLVED. do NOT install numpy with pip instead using apt-get. So, unistall numpy with pip, install with apt-get and reboot.

Harsh Sharma

unread,
Dec 17, 2018, 7:36:20 PM12/17/18
to Caffe Users
And how do you install numpy via apt-get?
 
I did
 
sudo apt-get install python-numpy but 
on 
import numpy 
i get 
no module named numpy 
Reply all
Reply to author
Forward
0 new messages