Hi, I was using Anaconda for pytorch. Everything works perfectly until a few days ago. It stops working.
I tried many different ways to solve this problem. However, the issue still exists.
I remove anaconda and reinstall a new anaconda, create a new environment and install a new pytorch.
Unfortunately, the errors are still there. I provide the following error messages. Any suggestions are appreciated.
Python 3.7.2 (default, Dec 29 2018, 06:19:36)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/qyou/anaconda3/envs/pytorch1.0/lib/python3.7/site-packages/torch/__init__.py", line 84, in <module>
from torch._C import *
ImportError: /home/qyou/anaconda3/envs/pytorch1.0/lib/python3.7/site-packages/torch/lib/libtorch_python.so: undefined symbol: _ZTIN5torch8autograd9generated33MkldnnConvolutionBackwardBackwardE
This error is usually thrown, when an old shared library somewhere on your system.
Did you build PyTorch from source recently?
If so, could you run this command:
$conda list | grep torch
# packages in environment at /home/qyou/anaconda3/envs/pytorch1.0:
pytorch 1.0.1 py3.7_cuda10.0.130_cudnn7.4.2_2 pytorch
torchvision 0.2.1 py_2 pytorch
pip list | grep torch
torch 1.0.1.post2
torchvision 0.2.1
I also tried the pytorch-nightly, the error is similar in libtorch_python.so, but with different undefined symbol as follows:
Python 3.7.2 (default, Dec 29 2018, 06:19:36)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/qyou/anaconda3/envs/pytorch1.0/lib/python3.7/site-packages/torch/__init__.py", line 84, in <module>
from torch._C import *
ImportError: /home/qyou/anaconda3/envs/pytorch1.0/lib/python3.7/site-packages/torch
/lib/libtorch_python.so: undefined symbol: _ZTIN3c1021AutogradMetaInterfaceE
These is somewhere the libaten still on your system.
Could you check your LD_LIBRARY_PATH for unnecessary paths?
Also just to make sure we get rid of all installs, could you run this again: