动手学深度学习-导入python模块:d2l_pytorch

import sys
#其中将".."里面的..换成d2lzh_pytorch文件夹的上一级路径
sys.path.append("..")
from d2lzh_pytorch import * 

其中错误:OSError: libtorch_cpu.so: cannot open shared object file: No such file or directory

将torchtext版本(0.8)降低为0.6即可:

pip uninstall torchtext

 

pip install torchtext==0.6.0

 

posted @ 2020-12-04 19:50  木芯子  阅读(3027)  评论(0编辑  收藏  举报