1、下载d2lzh_pytorch
2、解压,放入python环境里
文件路径如下:
3、回到代码,运行d2lzh_pytorch模块
3.1、错误提示:ModuleNotFoundError: No module named ‘tqdm’
直接命令行,pip install tqdm
即可安装tqdm模块。
3.2、错误提示:ModuleNotFoundError: No module named ‘torchtext’
直接命令行,pip install torchtext
即可安装torchtext模块。
在安装torchtext模块时,可能会遇到的问题:
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: ‘d:\python3.6\lib\site-packages\~orch\lib\caffe2.dll’
Consider using the--user
option or check the permissions.
如果遇到这个问题,使用命令pip install --user torchtext
进行安装。