linux下怎么通过镜像下载pytorch
时间: 2023-12-28 17:04:04 浏览: 93
在Linux下,您可以通过以下步骤使用镜像下载PyTorch:
1. 打开PyTorch官方网站(https://pytorch.org/)并选择适合您操作系统和CUDA版本的PyTorch版本。
2. 点击“Get started”按钮并选择“Download PyTorch with Conda”的选项。
3. 打开终端并输入以下命令以安装Miniconda:
```
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
```
4. 激活Miniconda环境:
```
source ~/miniconda3/bin/activate
```
5. 添加PyTorch镜像源:
```
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes
```
6. 安装PyTorch:
```
conda install pytorch
```
7. 等待安装完成后,您就可以开始使用PyTorch了。
请注意,这里使用的是清华大学的镜像源,您也可以选择其他可靠的镜像源。
阅读全文
相关推荐

















