首先在.bashrc中添加python环境变量
export PATHONPATH=~/caffe/python:$PYTHONPATH
source ~/.bashrc
若还是存在问题,则在运行的py文件中import caffe前添加
import sys
sys.path.insert(0, '~/caffe/python')
首先在.bashrc中添加python环境变量
export PATHONPATH=~/caffe/python:$PYTHONPATH
source ~/.bashrc
若还是存在问题,则在运行的py文件中import caffe前添加
import sys
sys.path.insert(0, '~/caffe/python')