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

遇到问题:
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver,
ImportError: libcaffe.so.1.0.0-rc3: cannot open shared object file: No such file or directory

Problem analysis (online check):
1. After caffe is installed, lib is not configured in /usr/lib or /usr/local/lib, you need to configure it manually:
2. The main reason for this problem is to use make to compile, which leads to import The static link library cannot be found in caffe.
3. When using spyder or eclipse import caffe, I always report an error, saying that the libcaffe.so (under the caffe/build/lib/ folder) file cannot be found. At this time, if it is in spyder or eclipse Adding the path is not easy, because libcaffe.so is not a python module, it is a static link library.

Solution:
locate libcaffe.so.1.0.0-rc

sudo vim ~/.bashrc Actually, you don’t need sudo, just go to the home directory to open the file, edit and save it.
Export LD_LIBRARY_PATH=/home/***/caffe/.build_release/lib:$LD_LIBRARY_PATH
source ~/.bashrc

Guess you like

Origin blog.csdn.net/LemonShy2019/article/details/114982295