https://github.com/BVLC/caffe/issues/6054
-
编辑 Makefile.config
comment python2.7
## Uncomment to use Python 3 (default is Python 2)
PYTHON_LIBRARIES := boost_python3 python3.6m
PYTHON_INCLUDE := /usr/include/python3.6m
/usr/lib/python3.6/dist-packages/numpy/core/include -
在build编译
cmake -D python_version=3 …
make all
make install
make pycaffe -
配置文件
sudo gedit ~/.bashrc
export PYTHONPATH=~/caffe/python/:$PYTHONPATH
export PYTHONPATH=/home/ying/usb/key_points/caffe_train-master/python:$PYTHONPATH
source ~/.bashrc