前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >『技术随手学』pip conda 替换清华源 Windows与Ubuntu通用

『技术随手学』pip conda 替换清华源 Windows与Ubuntu通用

作者头像
小宋是呢
发布2020-10-10 10:53:25
1.2K0
发布2020-10-10 10:53:25
举报
文章被收录于专栏:深度应用深度应用

pip

临时使用

代码语言:javascript
复制
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package

注意,simple 不能少, 是 https 而不是 http

设为默认

升级 pip 到最新的版本 (>=10.0.0) 后进行配置:

代码语言:javascript
复制
pip install pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

如果您到 pip 默认源的网络连接较差,临时使用本镜像站来升级 pip:

代码语言:javascript
复制
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U

conda

代码语言:javascript
复制
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
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 --append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/fastai/
conda config --append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
 

conda config --set show_channel_urls yes

-1.参考

-1.0:https://xiaosongshine.blog.csdn.net/article/details/108845337

-1.1:https://mirrors.tuna.tsinghua.edu.cn/help/pypi/

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-09-28 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • pip
    • 临时使用
      • 设为默认
      • conda
      • -1.参考
      领券
      问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档