zcbzcb1111111
2022-05-07 10:09
采纳率: 60%
浏览 32

ubuntu18.04 系统python3.7.3 pytorch1.3

在终端中输入import torch 如下

import torch
print(torch.version)
1.3.0
print(torch.cuda.is_available())
True

在pycharm中输入

import torch
print(torch.version)
1.3.0
print(torch.cuda.is_available())
True

运行后显示
Traceback (most recent call last):
File "/home/zhang/PycharmProjects/pythonProject/main.py", line 1, in
import torch
File "/home/zhang/anaconda3/envs/Gift/lib/python3.7/site-packages/torch/init.py", line 81, in
from torch._C import *
ImportError: libmkl_intel_lp64.so: cannot open shared object file: No such file or directory
尝试过将libmkl_intel_lp64.so的路径加入到环境配置中,但并没解决问题

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

3条回答 默认 最新