Conda的清华源配置

conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud//pytorch/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --set show_channel_urls yes

配置conda使用清华源,你可以按照以下步骤进行操作: 1. 打开终端或命令提示符窗口。 2. 输入以下命令来编辑.condarc文件:`vim ~/.condarc`。 3. 删除默认的镜像源配置,将以下内容添加到.condarc文件中: ``` channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ ``` 4. 如果需要下载opencv_python库,请将以下源添加到.condarc文件中: ``` https://pypi.tuna.tsinghua.edu.cn/simple/ ``` 5. 保存并关闭.condarc文件。 6. 通过运行以下命令,设置搜索时显示通道地址:`conda config --set show_channel_urls yes`。 7. 使用命令`conda config --show`来打印当前的conda配置,以确保清华源已经成功配置。 8. 现在你已经成功配置conda使用清华源,你可以使用`conda update conda`来更新conda自身,使用`conda update anaconda`来更新anaconda,使用`conda update --all`来更新所有库。 请注意,如果你不再需要使用清华源,你可以通过以下命令删除它们:`conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/`和`conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/`。或者,你可以直接编辑.condarc文件并删除对应的源配置。 希望这些信息能对你有所帮助!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值