问题描述
>>> import caffe Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/xxx/Downloads/caffe/python/caffe/__init__.py", line 1, in <module> from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer File "/home/xxx/Downloads/caffe/python/caffe/pycaffe.py", line 13, in <module> from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, ImportError: libopencv_core.so.3.4: cannot open shared object file: No such file or directory
问题原因
一种是系统中本身不存在该文件,这个需要自行查找;一种是系统存在该文件,只是系统不知道,可使用以下方法试试;
尝试方法
~/Downloads/caffe$ sudo ldconfig
使用以上方法问题还是没有解决;
参考
1.ImportError: libopencv_core.so.3.1: cannot open shared object file: No such file or directory;
完