Linux服务器上Anaconda安装各种机器学习包,如Pytorch

1.创建虚拟环境

conda create -n py37 python=3.7

py37是你创建的虚拟环境的名字。

在这里插入图片描述
在这里插入图片描述

2.激活环境

conda activate py37

在这里插入图片描述

3.在虚拟环境中安装包

conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch

4.安装成功

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Dai_sir_man/article/details/123771511