Installation of pytorch1.0 encountered the following problems:
>>> import torch
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "xxxxx/site-packages/torch/__init__.py", line 84, in <module>
from torch._C import *
ImportError: xxxxx/site-packages/torch/lib/libmkldnn.so.0: undefined symbol: cblas_sgemm_alloc
Someone on the Internet has solved this problem by opening ~ /. Bashrc and finding the declaration of such a variable:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
Then comment it out and the problem is solved.
But I don’t have such a line when I open the bashrc file
after many searches, I have solved this problem as follows:
conda install -c anaconda mkl
This line of code, and then I import torch succeeded!
Hope to help you!