You are not logged in.

#1 2016-07-25 06:57:15

tiantong
Member
Registered: 2015-12-25
Posts: 8

can't compile caffe--pycaffe with python-numpy-mkl

When I compile caffe's pycaffe with python-numpy-mkl, it will shows

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

This is part of my Makefile.config of caffe

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

PYTHON_LIBRARIES := boost_python3 python3.5m
PYTHON_INCLUDE := /usr/include/python3.5m \
 /usr/lib/python3.5/dist-packages/numpy/core/include \
/usr/lib/python3.5/dist-packages/numpy/core/include/numpy
# We need to be able to find libpythonX.X.so or .dylib.
PYTHON_LIB := /usr/lib

This is my arrayobject.h's location.

/usr/lib/python2.7/site-packages/numpy/core/include/arrayobject.h
/usr/lib/python2.7/site-packages/numpy/core/include/ndarrayobject.h
/usr/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h
/usr/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h
/usr/lib/python3.5/site-packages/numpy/core/include/arrayobject.h
/usr/lib/python3.5/site-packages/numpy/core/include/ndarrayobject.h
/usr/lib/python3.5/site-packages/numpy/core/include/numpy/arrayobject.h
/usr/lib/python3.5/site-packages/numpy/core/include/numpy/ndarrayobject.h

It's originally in

/usr/lib/python3.5/site-packages/numpy/core/include/numpy/

. I copy it to

/usr/lib/python3.5/site-packages/numpy/core/include

, but it doesn't help.

However, when I use python-numpy, there is no problem. Is there any solution so that I can compile caffe--pycaffe with python-numpy-mkl?

I have newest packages with ArchLinux. Having installed all dependence, compile caffe by my self.  python-numpy-mkl is installed from aur.

Offline

#2 2016-08-12 18:46:34

jethronsun7
Member
Registered: 2016-04-29
Posts: 44
Website

Re: can't compile caffe--pycaffe with python-numpy-mkl

I have never used caffe before, I can provide some suggestions:

* Are you sure which python you are using? By default ``which python`` will show python3. And the things you showed here looks like you are trying to use python2 and python3 packages.
* Normally, Python programmer will use virtualenv to provide a clear environment to do developing or deploying. No sure whether or not it can solve your problems.


Have fun!

Offline

Board footer

Powered by FluxBB