python/caffe/_caffe.cpp:10:31: fatal error: numpy/arrayobject.h: No such file or directory

8,292 views
Skip to first unread message

BadChimpStew

unread,
Jul 9, 2015, 8:14:49 PM7/9/15
to caffe...@googlegroups.com
Ok, so, for the past 6 hours I have been trying everything to fix this error. I am 100% positive that numpy is installed to the path that I have included in PYTHON_INCLUDE under ANACONDA_HOME in the Makefile.config. I am using Anaconda btw. Also, I have installed and reinstalled numpy several times. Any suggestions what-so-ever are extremely appreciated. Thanks in advance!

Zhuotun Zhu

unread,
Dec 26, 2015, 11:58:58 PM12/26/15
to Caffe Users
Hi, I came into the same problem and searched a solution online. Maybe you can try the following:
sudo apt-get install python-numpy then make clean, make pycaffe

Doug Shawhan

unread,
Jul 27, 2016, 10:53:24 AM7/27/16
to Caffe Users

My problem was that the version of numpy installed by pip sticks it's libs in /usr/local/lib

PYTHON_INCLUDE := /usr/include/python2.7 \
        /usr/local/lib/python2.7/dist-packages/numpy/core/include


. . . in Makefile.config, followed by "make clean && make all && make pycaffe" fixed me up.

Xiaoqi Shiao-Chi Chai

unread,
Apr 13, 2017, 4:48:13 PM4/13/17
to Caffe Users
Thank you!!!

Dick Sven

unread,
Sep 22, 2017, 1:38:24 AM9/22/17
to Caffe Users
Thanks a lot!

在 2015年7月10日星期五 UTC+8上午8:14:49,BadChimpStew写道:

Zhida Zhang

unread,
Jan 23, 2018, 1:37:07 AM1/23/18
to Caffe Users
It works! Thanks!
Reply all
Reply to author
Forward
0 new messages