①
通過 conda config 命令生成配置文件,這里,使用清華的鏡像:https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/,
首先,打開CMD,執(zhí)行命令:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
②
執(zhí)行命令:conda config --set show_channel_urls yes
③
此時(shí),目錄 C:\Users<你的用戶名> 下就會生成配置文件.condarc
④
修改上述配置文件,刪除上述配置文件 .condarc 中的第三行(即 -defaults),然后保存
⑤
查看是否生效,通過命令 conda info 查看當(dāng)前配置信息,內(nèi)容如下,即修改成功,關(guān)注 channel URLs 字段內(nèi)容
⑥
測試一下,安裝requests,執(zhí)行命令:conda install requests