更新conda源

各系统都可以通过修改用户目录下的 .condarc 文件:

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/free
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
custom_channels:
conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

即可添加 Anaconda Python 免费仓库。Windows文件路径在C:\Users\yourname\.condarc,Mac文件路径在/Users/yourname/.condarc, 如没有或者无法直接创建名为 .condarc 的文件,可先执行 conda config --set show_channel_urls yes 生成该文件之后再修改。

更新pip源

清华的pypi 镜像每 5 分钟同步一次。

临时使用

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

此时会生成pip的配置文件,Windows配置文件为C:\Users\yourname\pip\pip.ini,Mac配置文件为/Users/yourname/.config/pip/pip.conf,内容为

[global]
index-url = https:``//pypi.tuna.tsinghua.edu.cn/simple

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

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

参考

更新Conda源和pip源的更多相关文章

  1. ubuntu18.04里更新系统源和pip源

    一.修改ubuntu系统源 我的ubuntu系统是在清华的开源网站上下的,所以我还以为他应该就帮我弄好源了,可是没想到下载的还是非常慢,看到下载的时候网址前还有个us,就知道不是国内源了.所以这里我们 ...

  2. win10下更新anaconda和pip源

    第一步:更新anaconda源. anaconda的官方源太慢,推荐清华源:https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/ 软件下载也可以在这个 ...

  3. ubuntu 16.04下更换源和pip源【转】

    本文转载自:https://blog.csdn.net/weixin_41500849/article/details/80246221 写在前面的话 本文主要内容是更换系统源为清华大学源,更换pyt ...

  4. ubuntu 更换系统源和pip源

    1 . 备份 cd /etc/apt sudo cp sources-list sources-list.bak 2 . 编辑 这里用了阿里云的源 sudo vi sources-list 将文件内容 ...

  5. 修改conda和pip源

    修改conda源为中科大源 Windows修改C:\Users\user(user替换为当前登陆系统的用户)目录下的.condarc文件 Linux修改家目录下的.condarc文件 channels ...

  6. conda 和 pip 安装,更新,删除

    安装: pip install xxx conda install xxx 更新: pip  install --upgrade xxx conda update xxx 删除: pip uninst ...

  7. Python更换pip源,更换conda源

    更换pip源: 1.在windows文件管理器中,输入 %APPDATA% 2.在该目录下新建pip文件夹,然后到pip文件夹里面去新建个pip.ini文件 3.在新建的pip.ini文件中输入以下内 ...

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

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

  9. Python之 最全 Conda、pip 管理环境和安装包、更换源、解决HttpError等一些列问题

    在Anaconda中conda可以理解为一个工具,也是一个可执行命令,其核心功能是环境管理与包管理.所以对虚拟环境进行创建.删除等操作需要使用conda命令. conda install 和 pip ...

随机推荐

  1. keil mdk 菜单 “project” 崩溃问题解决

    今天发现我的 Keil MDK5.28z win10系统上面,点击 Project 菜单立即崩溃.网上找到了解决方法 简单粗暴的处理方法:重装keil ,但是依然点击 project 崩溃. 通过搜索 ...

  2. Spring MVC的方法返回值和参数传递

    1. SpringMVC方法的返回值类型 3.1String类作为返回值 3.1.1Controller层 /** * 返回值类型为String时,一般用于返回视图名称 * 1.当方法返回值为null ...

  3. markdown 显示图片的三种方式

    插入网络图片 插入本地图片 base64 图片(data:image/png;base64,iVBORw0KG........) ps:base64编码的图片可以通过站长工具编码 https://to ...

  4. 使用jQuery快速高效制作网页交互特效---使用jQuery操作DOM

    DOM操作分类 1.DOM Core:任何一种支持DOM的编程语言都可以使用它,如getElementById() 2:HTML-DOM:用于处理HTML文档,如document.forms 3:CS ...

  5. 002_simulink中显示模块中的名字

    (一)Display--->Hide Automatic Names(√去掉)

  6. Linux 内核参数说明

    转载自: https://www.cnblogs.com/tolimit/p/5065761.html 因个人能力有限,不能保证所有描述都正确,还请大家集思广益,有错误的地方欢迎大家留言指正,同时也欢 ...

  7. java前后分离了 controller接口GET和POST

    通用 @RestController GET @RequestMapping("userbase/{userId}") public User selectById(@PathVa ...

  8. Python中的各种排序问题

    小书匠python排序 本章目录,快速浏览所需内容: 基本的排序 1.列表(list) 1.1按列表元素大小排序 1.2按列表元素的属性 2.字典(dictory) 3.元组(tuple)排序 3.1 ...

  9. Springboot @ConditionalOnProperty注解

    最近看了一段代码其中用到了@ConditionalOnProperty注解,直接没有了解过这个注解,今天看到了顺便了解一下 具体代码如下 @Configuration public class Web ...

  10. 数据结构实验之查找四:二分查找(SDUT 3376)

    #include <stdio.h> #include <string.h> #include <stdlib.h> int a[1000005]; int fin ...