crfasrnn icon indicating copy to clipboard operation
crfasrnn copied to clipboard

Unable to import caffe

Open dalafer opened this issue 9 years ago • 2 comments

When attempting to run the python demo script I am getting the following error, I am having trouble identifying what is left out, I am thinking it could be an EVN variable. Any suggestion on what could be causing this?

File "/var/www/crfasrnn_original/python-scripts/demo_test.py",

line 29, in import caffe File "../caffe-crfrnn/python/caffe/init.py",

line 1, in from .pycaffe import Net, SGDSolver File "../caffe-crfrnn/python/caffe/pycaffe.py",

line 10, in from ._caffe import Net, SGDSolver ImportError: libcudart.so.6.5: cannot open shared object file: No such file or directory

dalafer avatar Feb 18 '16 04:02 dalafer

@abdalafamsee Did you try to set the correct path there? This should solve your problem.

caffe_root = '../caffe-crfrnn/' import sys sys.path.insert(0, caffe_root + 'python')

On the note of libcudart.so.6.5. You should add cuda library path to./bashrc or ./bash_profile (mac). For macbook pro, you should set something like below in your ~/.bash_profile. In Ubuntu/Centos/other linux, set the path to ~/.bashrc. After this, type "source ~/.bashrc" or "source ~/.bash_profile" export LD_LIBRARY_PATH="/Developer/NVIDIA/CUDA-7.5/lib:$LD_LIBRARY_PATH"

bittnt avatar Feb 18 '16 09:02 bittnt

@bittnt Dear Owner , does cudnn must higher than 7.0 ?

I get the problem

superxiaoying avatar Aug 02 '17 06:08 superxiaoying