2

I've installed Caffe on my Ubuntu 14.04 machine. the make runtest runs perfectly fine with 581 tests passed. I'm trying to work with the command line and python interface and getting the following two errors:

  1. Command Line Interface: When I try to run the command caffe, I'm getting the following error:

    No command 'caffe' found, did you mean: Command 'caff' from package 
     'signing-party' (universe)
    caffe: command not found 
    
  2. Python Interface: When I run the command make pycaffe, I'm getting the following error:

    CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp
    python/caffe/_caffe.cpp:9:31: fatal error: numpy/arrayobject.h: No such file 
    or directory
    #include <numpy/arrayobject.h>
                                  ^
    compilation terminated.
    make: *** [python/caffe/_caffe.so] Error 1
    
Dr. Prasanna Date
  • 745
  • 1
  • 9
  • 29

2 Answers2

2

Make sure that numpy is installed correctly and the path is mentioned to detect the newly installed library. The steps are provided in Caffe website itself.

For the 'Caffe' command to work, you will have to step into the folder where the 'Caffe' executable is created and then try running the executable through the terminal.

Anoop K. Prabhu
  • 5,417
  • 2
  • 26
  • 43
  • Thanks Anoop. It turns out numpy wasn't installed in the default Python on my machine. The Caffe command is still not working. However, I'm using Anaconda to run Python right now, and it all works out just fine. I'm having issues with creating a LMDB data file to be run with Caffe though. [Here](http://stackoverflow.com/questions/30769048/error-in-creating-lmdb-database-file-in-python-for-caffe) is the link to the question. Please have a look. – Dr. Prasanna Date Jun 11 '15 at 15:23
1

Regarding the second problem you had, I had the same problem, I solved uncommenting this line inside the Makefile.config:

# Decomment le line uncommented below:
# Homebrew installs numpy in a non standard path (keg only)
PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include
# PYTHON_LIB += $(shell brew --prefix numpy)/lib
madx
  • 6,723
  • 4
  • 55
  • 59