Miniconda3及pip换源(conda清华源关闭)
生活随笔
收集整理的這篇文章主要介紹了
Miniconda3及pip换源(conda清华源关闭)
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
Miniconda3及pip換源
一、更換miniconda3的源,以清華的源為例:
清華源地址:https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
安裝完miniconda3之后,執(zhí)行下列命令即可
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ conda config --set show_channel_urls yes清華源關(guān)閉后的換源:
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/ conda config --add channels https://repo.continuum.io/pkgs/free/ conda config --add channels https://repo.continuum.io/pkgs/main/ conda config --set show_channel_urls yes二、更換pip的源,以清華源為例:
清華源地址:https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
- 臨時(shí)使用
- 永久生效
修改 ~/.config/pip/pip.conf (Linux), %APPDATA%\pip\pip.ini (Windows 10) 或 $HOME/Library/Application Support/pip/pip.conf (macOS) (沒(méi)有就創(chuàng)建一個(gè)), 修改 index-url至tuna,例如
[global] index-url = https://pypi.tuna.tsinghua.edu.cn/simplepip 和 pip3 并存時(shí),只需修改 ~/.pip/pip.conf;目錄和文件如果不存在則手動(dòng)創(chuàng)建
總結(jié)
以上是生活随笔為你收集整理的Miniconda3及pip换源(conda清华源关闭)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: CPU虚拟化系列文章之虚拟机切入和退出
- 下一篇: JeecgBoot低代码平台 2.4.5