前言
正文
包和模块
本次需要用到的包有:
torch
IPython
Matplotlib
numpy
random
tqdm
torchtext
我们在之前的博文中新建的环境中并不包含以上的很多包,所以首先需要在Anaconda下安装这些模块
以管理员身份运行Anaconda命令行并切换至之前新建的环境,接着一一安装以上的包:
activate forPytorch
conda install torch # 这里之前安装过故会提示All requested packages already installed.
conda install IPython
conda install matplotlib
conda install numpy # 这里之前安装过故会提示All requested packages already installed.
conda install tqdm
pip install torchtext
conda install ipykernel
逐一安装完后即可以进行接下来的操作