问题描述:
我是用pycharm跑的李沐大神的代码,代码是从GitHub(https://github.com/Miraclelucy/dive-into-deep-learninghttps://github.com/Miraclelucy/dive-into-deep-learning)借鉴过来的,想运行的时候,这句报错了:
from d2l import torch as d2l
应该是没有导入d2l的包,网上看了半天也没有找到直接的解决方式,很奇怪。
解决办法:
安装对应的包就好了。
1.打开conda的prompt;
2.激活你想要使用的环境,即activate;
3.激活环境后,输入命令 pip install -U d2l
4.回车安装完成,代码跑通