Installing PyCaffe

Jump to: navigation, search

Hello,

I have managed to successfully build OpenCL/ViennaCL, OpenCV, Caffe, etc. following the instructions here http://elinux.org/R-Car/Boards/Yocto-Gen3/OpenCL Unfortunately I am having trouble installing the python bindings for caffe (which allows one to simply import caffe in python and run caffe commands natively in python). I tried to do this by changing the CMake parameter -DBUILD_python in caffe_git.bb to ON. My error is as follows. I've tried setting the various python (and git and boost) paths manually but none seem to work correctly. Has anybody else had experience with this?


DEBUG: Executing python function sysroot_cleansstate

DEBUG: Python function sysroot_cleansstate finished

DEBUG: Executing shell function do_configure

-- The C compiler identification is GNU 5.2.1

-- The CXX compiler identification is GNU 5.2.1

-- Check for working C compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc

-- Check for working C compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++

-- Check for working CXX compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Boost version: 1.60.0

-- Found the following Boost libraries:

-- system

-- thread

-- filesystem

-- Looking for pthread.h

-- Looking for pthread.h - found

-- Looking for pthread_create

-- Looking for pthread_create - not found

-- Looking for pthread_create in pthreads

-- Looking for pthread_create in pthreads - not found

-- Looking for pthread_create in pthread

-- Looking for pthread_create in pthread - found

-- Found Threads: TRUE

-- Found GFlags: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include

-- Found gflags (include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include, library: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libgflags.so)

-- Found Glog: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include

-- Found glog (include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include, library: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libglog.so)

-- Found PROTOBUF: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libprotobuf.so

-- Found PROTOBUF Compiler: /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/protoc

-- -- CUDA is disabled. Building without it...

-- Found ViennaCL include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include

-- Found OpenCL: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libOpenCL.so

-- Found OpenCL include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include

-- OpenCV found (/home/eli/build/build/tmp/sysroots/h3ulcb/usr/share/OpenCV)

-- Found OpenBLAS libraries: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libopenblas.so

-- Found OpenBLAS include: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/include

-- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7")

-- Found PythonLibs: /home/eli/build/build/tmp/sysroots/h3ulcb/usr/lib/libpython2.7.so (found suitable version "2.7.11", minimum required is "2.7")

-- To find NumPy Python interpretator is required to be found.

-- Could NOT find NumPy (missing: NUMPY_INCLUDE_DIR NUMPY_VERSION) (Required is at least version "1.7.1")

-- Could NOT find Boost

-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)

-- Python interface is disabled or not all required dependencies found. Building without it...

-- Could NOT find Git (missing: GIT_EXECUTABLE)

--

-- ******************* Caffe Configuration Summary *******************

-- General:

-- Version  : 1.0.0

-- Git  : unknown

-- System  : Linux

-- C++ compiler  : /home/eli/build/build/tmp/sysroots/x86_64-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++

-- Release CXX flags : -DNDEBUG -march=armv8-a -mtune=cortex-a57.cortex-a53 --sysroot=/home/eli/build/build/tmp/sysroots/h3ulcb -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix- map=/home/eli/build/build/tmp/work/aarch64-poky-linux/caffe/git-r0=/usr/src/debug/caffe/git-r0 -fdebug-prefix-map=/home/eli/build/build/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/home/eli/build/build/tmp/sysroots/h3ulcb= -fvisibility-inlines-hidden -fPIC -Wall -std=c++11 -DCMAKE_BUILD -Wno-sign-compare -Wno-uninitialized

-- Debug CXX flags  : -g -march=armv8-a -mtune=cortex-a57.cortex-a53 --sysroot=/home/eli/build/build/tmp/sysroots/h3ulcb -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix- map=/home/eli/build/build/tmp/work/aarch64-poky-linux/caffe/git-r0=/usr/src/debug/caffe/git-r0 -fdebug-prefix-map=/home/eli/build/build/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/home/eli/build/build/tmp/sysroots/h3ulcb= -fvisibility-inlines-hidden -fPIC -Wall -std=c++11 -DCMAKE_BUILD -Wno-sign-compare -Wno-uninitialized

-- Build type  : Release

--

-- BUILD_SHARED_LIBS : ON

-- BUILD_python  : ON

-- BUILD_matlab  : OFF

-- BUILD_docs  : ON

-- CPU_ONLY  : OFF

-- USE_OPENCV  : ON

-- USE_FFT  : OFF

-- USE_LEVELDB  : OFF

-- USE_LMDB  : OFF

-- USE_NCCL  : OFF

-- ALLOW_LMDB_NOLOCK : OFF

-- USE_HDF5  : OFF

--

-- Dependencies:

-- BLAS  : Yes (open)

-- Boost  : Yes (ver. 1.60)

-- glog  : Yes

-- gflags  : Yes

-- protobuf  : Yes (ver. 2.6.1)

-- OpenCV  : Yes (ver. 3.1.0)

-- CUDA  : No

--

-- Documentaion:

-- Doxygen  : No

-- config_file  :

--

-- Install:

-- Install path  : /usr

--

-- Configuring done

CMake Error at CMakeLists.txt:211 (add_dependencies):

 The dependency target "pycaffe" of target "pytest" does not exist.



-- Generating done


-- Build files have been written to: /home/eli/build/build/tmp/work/aarch64-poky-linux/caffe/git-r0/build

WARNING: exit code 1 from a shell command.

ERROR: Function failed: do_configure (log file is located at /home/eli/build/build/tmp/work/aarch64-poky-linux/caffe/git-r0/temp/log.do_configure.27252)

01:02, 3 August 2017