PyCharm下添加caffe路径

来源:互联网 发布:office mac 2016 破解 编辑:程序博客网 时间:2024/06/04 00:26

最近刚刚接触python+caffe,感觉调试特别麻烦,所以使用了PyCharm软件,但是调试总是出问题,很难受。。

在import caffe的时候,总是出现错误:

 ImportError: libcaffe.so.1.0.0-rc3: cannot open shared object file: No such file or directory

以下是我看的三种办法,

1.在pycharm中使用临时的办法,每次新建程序时,都把caffe/python的路径添加到现在的程序中:

import sys

sys.path.append('/home/dumengnan/caffe-master/python')

2.在~/.bashrc末尾添加你的caffe路径

3.PyCharm添加caffe路径

File->Settings->Project interpreter下添加 caffe下的python路径 /home/XXX/caffe/python

详见http://blog.csdn.net/wh357589873/article/details/53204024

0 0
原创粉丝点击