配置linux的anaconda3国内清华、阿里云镜像 & anaconda查看源和恢复默认默认源操作

配置linux的anaconda3国内清华、阿里云镜像

配置源

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/r
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
conda config --add channels https://mirrors.aliyun.com/anaconda/pkgs/free/
conda config --add channels https://mirrors.aliyun.com/anaconda/pkgs/main/
conda config --add channels https://pypi.tuna.tsinghua.edu.cn/simple
conda config --set show_channel_urls yes

查看源

conda config --show channels

删除某个源

conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main

指定某个源安装包

以安装numpy和tensorflow为例

pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install tensorflow -i https://pypi.tuna.tsinghua.edu.cn/simple

恢复默认源

有的包国内镜像没有,比如我使用 conda create -n pytorch python==3.6.7,使用清华镜像找不到。
此时可以恢复默认源

conda config --remove-key channels

参考文献

https://blog.csdn.net/weixin_44064937/article/details/131123158

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

computer_vision_chen

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值