Skip to content

Install Issue: torch/_C.so looks for two versions of cuda #1941

@wk910930

Description

@wk910930

Hi,

When I am trying to import torch, it said ImportError: libcudart.so.7.5: cannot open shared object file. However, when I run the command ldd /usr/local/lib/python2.7/dist-packages/torch/_C.so, it shows

...
linux-vdso.so.1 =>  (0x00007ffcc25f4000)
libshm.so => /usr/local/lib/python2.7/dist-packages/torch/lib/libshm.so (0x00007fa881131000)
libcudart.so.8.0 => /usr/local/cuda/lib64/libcudart.so.8.0 (0x00007fa880eca000)
libnccl.so.1 => /usr/local/lib/libnccl.so.1 (0x00007fa87eead000)
libTH.so.1 => /usr/local/lib/python2.7/dist-packages/torch/lib/libTH.so.1 (0x00007fa87e8e2000)
...
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa86ed3f000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fa86eb37000)
libcudart.so.7.5 => not found
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa86e830000)
libopenblas.so.0 => /usr/lib/libopenblas.so.0 (0x00007fa86d01d000)
...

Somehow it is looking for the libcudart of two different versions (7.5 & 8.0) at the same time! Currently in my machine, there is only cuda-8.0 installed and /usr/local/cuda is linking to cuda-8.0, too. I have been confused by this for 3 days.

Someone encountered the same issue?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions