温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Miniconda3及pip换源

发布时间:2020-07-14 07:45:28 来源:网络 阅读:3389 作者:yhyang 栏目:编程语言

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

二、更换pip的源,以清华源为例:

清华源地址:https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/

  • 临时使用
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
  • 永久生效

修改 ~/.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/simple

pip 和 pip3 并存时,只需修改 ~/.pip/pip.conf;目录和文件如果不存在则手动创建

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI