caffe2
caffe2 copied to clipboard
cannot load caffe2.python/ Error: libcudart.so.9.1:cannot open shared object file: No such file
I have installed caffe2 with pre-build binaries in conda.use this command conda install -c caffe2 caffe2-cuda9.0-cudnn7 but when I input "python -c 'from caffe2.python import core' '", there are a warning and a CRITICAL:root , shows " CRITICAL:root:cannot load caffe2.python/ Error: libcudart.so.9.1:cannot open shared object file: No such file or directory". But I installed the cuda9.0, why it would find the 9.1? And I have read other issues similar with mine, someone said the caffe2 surport the cuda9.0, not 9.1. so I have no idea to solve it. Can anyone give me some advices? Thanks.
Probably the current conda build is built against cuda 9.1, the best solution is to install the newer version of cuda.
Otherwise you can try to create a symbolic link to your libcudart.so.
The command should be somethink like
sudo ln -s /usr/local/cuda-9.0/ /usr/local/cuda-9.1/
and inside your folder just do a copy of your libcudart.so.9.0
called libcudart.9.1
.
@block98k can you run ldd
on your libcaffe2_gpu.so and look for CUDA libs in the output? When I run this I get
ldd /opt/conda/lib/libcaffe2_gpu.so | grep libcu
libcuda.so.1 => not found
libcurand.so.9.0 => not found
libcudnn.so.7 => not found
libcublas.so.9.0 => not found
(I ran this on a machine without CUDA, so the "not found" is expected, but you should have actual paths there instead). It looks to me like this package is correctly linked against CUDA 9.0, and not 9.1 . Once you run this ldd
command, then run ldd
on every library that shows up in the output, until you find which one is linking against libcudart.so.9.1
. Can you give me the ldd
output of the library that's the cause of this?
Do you happen to have both CUDA 9.1 and 9.0 on your machine?