conda install pytorch换源
时间: 2023-10-17 08:35:30 浏览: 165
要在conda中更换pytorch源,可以按照以下步骤进行操作:
1. 首先查看当前的conda源配置,可以使用命令:conda config --show
2. 设置在搜索时显示通道地址,可以使用命令:conda config --set show_channel_urls yes
3. 切换回默认源,可以使用命令:conda config --remove-key channels
4. 删除源,可以使用命令:conda config --remove channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'
5. 添加清华源,可以使用以下命令逐个添加:
- conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- conda config --add channels https://mirrors.tuna.tsinghua.edu.***://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
- conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
- conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ #pytorch需要
这样,conda安装pytorch时会使用清华源进行下载和安装。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [安装pytorch和conda换源](https://blog.csdn.net/qq_53344001/article/details/130650702)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文
相关推荐


















