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