Error when torch.load() model, not found

Dear all,

I tried to load a pre-train model saved in *.pth by using torch.load().
It always return RuntimeError: Error in dlopen or dlsym: cannot open shared object file: No such file or directory
I tried to export path as in, still the same error.
Even I changed directory to the folder which has the file, it still report same error.


I used torch version 1.3.1 installed in a linux conda environment.

1 Like

@sonnguyen have you find a solution?

Yes, kind of. I upgraded it to PyTorch 1.4 and problem solved.

I’m having the same issue appearing under different circumstances: it happens only when I try to run a script from the terminal using CUDA. If I don’t the script runs fine.

I am running:

pytorch 1.4.0 py3.7_cuda10.1.243_cudnn7.6.3_0
Linux 5.6.13