ImportError: cannotfrom: can't read /var/mail/torch._C

When I import torch I get the following issus:
Traceback (most recent call last):
** File “”, line 1, in **
** File “/home/ljw/anaconda2/envs/python35/lib/python3.5/site-packages/torch/”, line 53, in **
** from torch._C import ***
ImportError: cannot open shared object file: No such file or directory

I install torch from source


I had this problem earlier because I used different machines: one to build and another to use the library later.

Verify if your library ‘’ is in the folder pointed by LD_LIBRARY_PATH environtment variable.