caffe下python环境的编译
安装python所需的依赖包
(1)sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
(2)再使用pip安装requirements.txt文件中所指定的包(若之前没安装过pip,需要安装pip:sudo apt-get install python-pip)
在caffe根目录下使用命令:
for req in $(cat python/requirements.txt); do pip install $req; done
(在这之前需要使用命令su root转到root用户,因为安装过程需要root权限)
2、Makefile.config文件中,将
PYTHON_INCLUDE := /usr/include/python2.7 \
/usr/lib/python2.7/dist-packages/numpy/core/include
改为
PYTHON_INCLUDE := /usr/include/python2.7 \
/usr/local/lib/python2.7/dist-packages/numpy/core/include