- 下载并安装Anaconda;
- 创建虚拟环境:
conda create -n nlp python=3.7
- 切换到nlp虚拟环境:
source activate nlp
- 为conda添加清华镜像源:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes
- 安装pytorch-cuda:
conda install pytorch torchvision cudatoolkit=10.0
Anaconda + python3.7 + pytorch-cuda Linux环境搭建
最新推荐文章于 2024-08-06 11:09:13 发布