Sorry, I usually build pytorch from source and do not know what’s wrong with the pytorch you installed.
Maybe you can check if your pytorch link all libraries correctly.
cd /usr/local/lib/python2.7/dist-packages/torch
ldd _C.so

Enter the installation path and check the library link.