更新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. dt7.0自定义推送熊掌号功能插件

    因要推送较早的数据,所以写了一个自定义推送熊掌号的功能插件,因我自己站点是新站,推送的数据较少,所以程序比较简单,算是初始版本,凑合着用吧. <?php /* 百度当天主动推送熊掌功能 作者:6 ...

  2. finalize关键字小结

    1.先看一下Object类中的finalize方法:可见里面什么也没有,说明让我们自己重写 * @throws Throwable the {@code Exception} raised by th ...

  3. BZOJ 2699: 更新 (DP)

    题目 对于一个数列A[1-N],一种寻找最大值的方法是:依次枚举A[2]到A[N],如果A[i]比当前的A[1]值要大,那么就令A[1]=A[i],最后A[1]为所求最大值.假设所有数都在范围[1, ...

  4. vue:概要

    一.环境 #安装nodejs-官网安装包配置环境变量 node -v #安装webpack npm install webpack -g #安装vue-cli npm install vue-cli ...

  5. js图片上传 的方法

    先规划出框架 <div id="AQA" style="width:300px; height:200px; background-color:aquamarine ...

  6. Cashe的使用

    1.CacheHelper public class CacheHelper { public static ObjectCache Cache { get { return MemoryCache. ...

  7. springboot项目上传文件大小限制问题

    1.报错信息: Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors wi ...

  8. 项目 java.lang.NoClassDefFoundError 异常。

    项目部署之后调用接口失败:异常信息: NoClassDefFoundError ClassNotFoundException 注意这两种是有区别的. 具体转 https://www.cnblogs.c ...

  9. 【原创】go语言学习(二十二)网络编程

    目录 TCP/IP协议介绍 GO快速实现TCP服务端 GO快速实现TCP客户端 UDP协议介绍 UDP编程实例 TCP/IP协议介绍 1.互联网起源 A. 起源于美国五角大楼,它的前身是美国国防部高级 ...

  10. vue中使用定时器时this指向

    箭头函数中的this指向是固定不变(定义函数时的指向),在vue中指向vue; 普通函数中的this指向是变化的(使用函数时的指向),谁调用的指向谁.   箭头函数: let timerOne = s ...