[SOLVED] Undefined symbol: THLongStorage_inferSizeN after install from source

I have just built and installed PyTorch from the master version in git and I am getting the following error when doing import torch:

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/dpernes/.anaconda3/envs/py36/lib/python3.6/site-packages/torch/__init__.py", line 53, in <module> from torch._C import * ImportError: /home/dpernes/.anaconda3/envs/py36/lib/python3.6/site-packages/torch/lib/libTHC.so.1: undefined symbol: THLongStorage_inferSizeN

I am using Python 3.6, CUDA 8.0 and CUDNN 6.
Thank you in advance.

It seems that doing pip uninstall torch still left some old files behind that were conflicting with the new installation. Removed the conda environment and created a new one from scratch and now pytorch works nicely.

1 Like

I have the same problem. I uninstalled pytorch, torchvision and anaconda3 and then installed them again, but things did not change…Do you know how to fix it?