conda换源方法具体参考清华大学镜像站Anaconda 镜像使用帮助

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 Forge
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ # msys2
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ # bioconda
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/ # menpo
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/ # pytorch
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
# for legacy win-64
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/peterjc123/ conda config --set show_channel_urls yes

方便复制

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 --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/peterjc123/
conda config --set show_channel_urls yes

pip 换源方法具体参考清华大学镜像站 pypi 镜像使用帮助

临时使用

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

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

设为默认

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

pip install pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

或者修改配置文件:~/.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 & conda 换源的更多相关文章

  1. pip&conda 换源

    PIP 各种可用源 清华源:https://pypi.tuna.tsinghua.edu.cn/simple 临时指定源 pip install -i https://pypi.tuna.tsingh ...

  2. pip 安装更新卸载 pip/yum换源

    pip安装:sudo apt-get install python3-pip pip更新:sudo pip3 install --upgrade pip pip卸载:sudo apt-get remo ...

  3. conda换源

    装完Anaconda后,建议更新所有的包,因为以后使用很可能会报错. 而更新的时候conda的官方源在美国,不换源就非常蓝瘦,有生之年够呛了. 换源: conda config --add chann ...

  4. py conda 换源

    安装软件 $ conda install wxpython 如果出现http错误,安装OpenSSL $ conda config --add channels https://mirrors.tun ...

  5. conda、pip换源以及conda、pip命令比较

    conda换源: conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda ...

  6. python虚拟环境 + 批量pip + 换源

    python虚拟环境 + 批量pip + 换源 虚拟环境 曾经我是一个小白,不管运行什么项目都用一个环境,后来项目多了,有的是Django1.11的有的是Django2的,有的项目只能在3.6上运行, ...

  7. Windows下anaconda换源和pip换源

    换源解决下载安装速度慢的问题. 1. anaconda换源 打开cmd命令行,输入 conda config --set showchannelurls yes 会在C:\Users\xx文件夹下生成 ...

  8. pip换源安装

    pip install --index-url https://pypi.tuna.tsinghua.edu.cn/simple 要安装的 有些工具安装太慢, 换源安装一下, 速度一下子飞起

  9. pip和conda安装源更改

    pip和conda安装源更改 python模块安装,使用国内源可以提高下载速度. pip源更改: pip源有好几个,我一直用的清华的pip源,它5分钟同步一次. 临时使用: pip 后加参数 -i h ...

随机推荐

  1. Brain的同步规则

    这段话来自Java编程思想并发一章 什么时候使用同步 如果你正在写一个变量,它可能接下来将被另一个线程读取,或者正在读取一个上一次已经被另一个线程写过的变量,那么你必须使用同步,并且,读写线程都必须用 ...

  2. springboot2整合zookeeper集成curator

    步骤: 1- pom.xml <dependency> <groupId>org.apache.curator</groupId> <artifactId&g ...

  3. 自定义ResultMap查询,这里的关联写法只能用于不分页

    <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "- ...

  4. SQL这样干,你就是给自己刨坑.....

    SQL是作为一个程序员接触得非常多的一种语言,但是,很多时候,我们会发现,有些SQL的执行效率异常的差,造成了数据库的负担.我们通过分析这些有问题的SQL,就可以发现很多我们平时在写SQL的时候忽略的 ...

  5. 25 Python之模块与包

    一.模块   模块就是一个包含了python定义和申明的文件,文件名就是模块的名字加上.py的后缀/ 模块的分类:     1.使用python编写的py文件     2.已被编译位共享库或者DLL或 ...

  6. 主流浏览器内核(IE、Chrome、Firefox、Safari、Opera)

    IE浏览器,使用Trident浏览器内核,又称为IE内核.只用于Windows平台,而且并不是开源的: chrome浏览器,目前使用的是Blink浏览器内核.浏览器内核的演进过程:Chromium  ...

  7. Slimvoice快速而小巧

    这可行吗?绝对没问题.完全加载的最大页面只有230 KB.因为所有内容都被缓存和压缩,所以随后查看的每个页面只有大约6 KB,这比我见过的具有相同功能的SPA要小得多. Slimvoice快速而小巧, ...

  8. Java程序员常用的Linux命令01——linux命令基础

    1.显示日期的命令date 显示日期: [root@localhost ~]# date 显示年月日: [root@localhost ~]# date '+%Y%m%d' 2.显示日历指令cal 显 ...

  9. shell脚本中的数组

    以下命令,都是以数组array=("20150417" "20150416" "20150415")为例. 注意bash中只支持一维数组,没 ...

  10. automake中Makefile.am和configure.ac的格式及编译过程

    step1:写Makefile.am step2:执行autoscan,会生成configurae.scan,修改configure.scan内容之后,命名为configure.ac step3:执行 ...