Python 3.6.9
GCC 8.3.0
在make pycaffe后,没有报问题;
在Python里面执行import caffe时,
报 段错误(核心已转储)。
解决办法:
进入caffe目录;
编辑 Makefile.config.
sudo gedit Makefile.config
找到
# 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
将Python 3 下面的lib和include Uncomment,并且将Python版本改为系统安装的Python版本。
保存。
执行
sudo make clean
sudo make -j
搞定。