美文网首页
pip, conda, CRAN 使用清华大学镜像

pip, conda, CRAN 使用清华大学镜像

作者: BeeBee生信 | 来源:发表于2024-11-07 15:41 被阅读0次

pip

临时使用时可设置 -i 参数,只对当次生效。

pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple some-package

将清华镜像设置为默认源,运行命令:

python -m pip install --upgrade pip
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple

设置后内容保存在家目录下的 .config/pip/pip.conf 配置文件。

conda

conda channel 配置在 ~/.condarc 文件,如果没有这文件可手动建立,下面是我的配置:

auto_activate_base: false
channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/

其中 default_channels 设置 defaults channel 的镜像地址;custom_channels 设置其他社区 channel 的镜像地址。我都设置为了清华大学镜像。

CRAN

设置镜像地址在 ~/.Rprofile 文件写入

options("repos" = c(CRAN="https://mirrors.ustc.edu.cn/CRAN/", BioC_mirror="https://mirrors.tuna.tsinghua.edu.cn/bioconductor"))

相关文章

  • pip、conda 设置国内源

    pip conda 添加国内源 1.pip 设为全局默认 其他国内镜像 pip临时使用国内镜像源 2.conda ...

  • conda使用笔记

    conda参数 基本使用 安装软件 安装python模块 - pip 查看,添加镜像

  • 1.下载

    命令行: pip install django==1.11.28 -i Python 使用清华大学镜像源 pip ...

  • conda

    下载 直接在搜索引擎搜索 conda 清华,进入Anaconda | 镜像站使用帮助 | 清华大学开源软件镜像站 ...

  • ubuntu 16.04安装pytorch

    基于conda安装,pyhon3.6 cpu版 修改conda镜像源为清华大学的源 conda config --...

  • pip/conda install cartopy安装失败问题要

    使用pip(或conda)安装cartopy pip install cartopy, conda install...

  • 0#4 conda 相关

    参考资料:   conda -h  清华大学镜像站 指令格式   usage: conda [-h] [-V] c...

  • conda包下载安装慢解决:conda改源

    为了更好安装包需要修改conda安装包所使用的镜像为国内的镜像下文以清华大学开源软件镜像站作为例子。 执行以下co...

  • pip切换源

    网上搜到的pip国内镜像大部分是豆瓣的 但是根本不全,很多包没有 所以推荐清华大学的 临时使用 可以在使用pip的...

  • 更换pip源

    网上搜到的pip国内镜像大部分是豆瓣的 但是根本不全,很多包没有 所以推荐清华大学的 临时使用 可以在使用pip的...

网友评论

      本文标题:pip, conda, CRAN 使用清华大学镜像

      本文链接:https://www.haomeiwen.com/subject/simxjjtx.html