Reputation: 421
I want to import caffe to my python 2.7 (anaconda/mac). I managed to do the make (all, test, and runtest), all passed with success. Here's a snippet of the make runtest command:
[----------] Global test environment tear-down
[==========] 1096 tests from 150 test cases ran. (49316 ms total)
[ PASSED ] 1096 tests.
The next step according to the caffe manual is to run the command:
make pycaffee
There I get the error:
make: *** No rule to make target `python/caffe/_caffe.cpp', needed by 'python/caffe/_caffe.so'. Stop.
I believe that this has to do with the pythonpath, however I cannot figure out what I am missing.
Here's a piece of my bash_profile:
export PATH="//anaconda/bin:$PATH" export
PATH="/home/XXX/anaconda/bin:$PATH" export
PYTHONPATH=~/Desktop/Google_deepDream/caffe-master/python:$PYTHONPATH
Also, a piece of my makefile looks like:
# NOTE: this is required only if you will compile the python interface.
# We need to be able to find Python.h and numpy/arrayobject.h.
#PYTHON_INCLUDE := /usr/include/python2.7 \
# /usr/lib/python2.7/dist-packages/numpy/core/include
# Anaconda Python distribution is quite popular. Include path:
# Verify anaconda location, sometimes it's nin root.
ANACONDA_HOME := ~/../../anaconda
PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
$(ANACONDA_HOME)/include/python2.7 \
$(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \
# We need to be able to find libpythonX.X.so or .dylib.
#PYTHON_LIB := /usr/lib
PYTHON_LIB := $(ANACONDA_HOME)/lib
I also have all the python dependencies:
for req in $(cat requirements.txt); do pip install $req; done
Upvotes: 0
Views: 2582
Reputation: 1
Try to uncomment your MakeFile.config
in a way like WITH_PYTHON_LAYER := 1
.
Make sure you have the _caffe.so
in caffe_dir/python/caffe
.
Upvotes: 0