情况是这样的:
1我自己新建了一个conda的环境叫cql,python是3.6,安装pytorch
2在终端import torch没有报错
3在pycharm中切换到我的环境里,import torch 就报了如题的错
ImportError: libmkl_intel_lp64.so: cannot open shared object file: No such file or directory
快要被坑死了,连接库也更新了,mkl也更新了还是不行:
(base) @pc:~$ python
Python 3.7.1 (default, Dec 14 2018, 19:28:38)
[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/pc/torch/__init__.py", line 84, in <module>
from torch._C import *
ImportError: libmkl_intel_lp64.so: cannot open shared object file: No such file or directory
>>>
解决方法 :
在pycharm中切换到我的环境里,然后用pycharm更新numpy(不要用终端pip)
希望能帮到人