vim     ~/.condarc

channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- defaults
show_channel_urls: true

vim   ~/.pip/pip.conf:

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com
timeout = 150
# 超时时间设置(单位为s),一般可以设置的长一些
% 国内镜像
% http://pypi.douban.com/simple/ 豆瓣
% http://mirrors.aliyun.com/pypi/simple/ 阿里
% http://pypi.hustunique.com/simple/ 华中理工大学
% http://pypi.sdutlinux.org/simple/ 山东理工大学
% http://pypi.mirrors.ustc.edu.cn/simple/ 中国科学技术大学
% https://pypi.tuna.tsinghua.edu.cn/simple 清华

ubuntu  清华源

 sudo vim   /etc/apt/sources.list
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse # 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
sudo apt-get update 

R,  Rstudio,  

R使用install.packages 安装程序包时,由于默认选择国外CRAN镜像,会导致下载程序包特别慢,经常导致安装失败。

其实只要一条语句就可以指定国内CRAN

  1. options(repos=structure(c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/")))
options(repos=structure(c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/")))  

这里的https://mirrors.tuna.tsinghua.edu.cn/CRAN/,选择的是清华大学镜像,速度会比国外的快很多。

例如执行:

  1. install.packages("ggplot2", dependencies = TRUE)

一般就可以安装成功了。

下面列出国内的CRAN镜像,供大家选择:

1、http://mirrors.opencas.cn/cran/ 中国科学院大学(Chinese Academy of Sciences, Beijing)
2、https://mirrors.tuna.tsinghua.edu.cn/CRAN/ 清华大学(TUNA Team, Tsinghua University)
3、http://mirrors.tuna.tsinghua.edu.cn/CRAN/ 清华大学(TUNA Team, Tsinghua University)

更多CRAN镜像:
https://cran.r-project.org/mirrors.html

conda清华源 pip 清华源ubuntu 清华镜像 R代理以及包的安装的更多相关文章

  1. npm 修改源 pip 修改源

    npm修改源由于不可说原因,npm install时,速度总是不尽如人意,解决办法是修改npm的数据源npm config set registry https://registry.npm.taob ...

  2. Ubuntu系统make menuconfig的依赖包ncurses安装

    Linux内核或者u-boot进行make menuconfig的时候,如果系统上没有安装ncurses,就会出现以下报错 *** Unable to find the ncurses librari ...

  3. ubuntu20.04 LTS 更换国内163源、阿里源、清华源、中科大源

    Ubuntu 20.04 是 Ubuntu 的第 8 个 LTS 版本,其重大更新和改进将在 2030 年前终止,计划于2020年 4 月 23 日发布. 国内有很多Ubuntu的镜像源,有阿里的.网 ...

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

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

  5. ubuntu修改pip的官方源为豆瓣源

    修改官方源为豆瓣源: 编辑配置文件, 如果没有, 新建一份(我这里没有): mkdir ~/.pipvim ~/.pip/pip.conf 添加内容如下: [global] index-url = h ...

  6. 安装和换源pip

    pip 是 Python 包管理工具,该工具提供了对Python 包的查找.下载.安装.卸载的功能 一.ubuntu安装和配置pip 1.进入终端,输入命令sudo su root ,输入密码后进入r ...

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

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

  8. pip换源简易方法

    安装pqi >>> pip install pqi 列出pip源 >>> pqi ls 使用pip源 >>> pqi use <name&g ...

  9. Python pip换源

    前言 哈喽呀,小伙伴们,晚上好呀,今天要给大家带来点什么呐,我们就来说说python的pip换源吧,这个换源,相对来说,还是比较重要的,能少生好几次气的,哈哈哈 为什么要换源 我们搞python的,肯 ...

随机推荐

  1. android中与Adapter相关的控件----Spinner&AutoCompleteTextView

    Spinner(列表选项框) & AutoCompleteTextView(自动完成文本框) 一.列表选项框核心属性 android:dropDownHorizontalOffset设置列表框 ...

  2. 《Linux命令行与shell脚本编程大全 第3版》Linux命令行---46

    以下为阅读<Linux命令行与shell脚本编程大全 第3版>的读书笔记,为了方便记录,特地与书的内容保持同步,特意做成一节一次随笔,特记录如下:

  3. 通过使用集合Properties完成JDBC的连接工具类

    1.将数据库连接对象所需参数保存在本地文件中 database.properties driverClass=com.mysql.jdbc.Driver url=jdbc:mysql://localh ...

  4. centos7下配置时间同步服务器

    同网段20几台服务器: 其中有一组mysql 集群中 互为主从 选一台mysql master 作为时间同步的服务器,这样做的好处以便于这台down了 另一个与他互为主从的master 继续提供时间同 ...

  5. hdu 2685(数论相关定理+欧几里德定理+快速取模)

    I won't tell you this is about number theory Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: ...

  6. iOS数组去重的方法,超级简单

    //最近新发现的一个数组去重,用不着循环,一句代码搞定 //去除数组中重复的 NSArray *oldArr = @[@"1",@"2",@"3&qu ...

  7. Linux中查看某个软件的安装路径

    Linux中查看某个软件的安装路径(地址)有时显得非常重要.比如某个文件的快速启动项被删除,或者你要建立快速启动项,或者想删除.添加安装文件等等,很多地方都要用到查案文件安装路径的命令. 这里给大家介 ...

  8. 2016北京集训测试赛(十六)Problem A: 任务安排

    Solution 这道题告诉我们, 不能看着数据范围来推测正解的时间复杂度. 事实证明, 只要常数足够小, \(5 \times 10^6\)也是可以跑\(O(n \log n)\)算法的!!! 这道 ...

  9. 谷歌浏览器chrome设置特定网页使用Https(ssl)访问

    1.在浏览器上输入: chrome://net-internals/ 2.在以下位置输入要自动进行https访问的域名即可. 注意:域名不能用范解析,只能一个一个手动输入.

  10. Python那些事

    Python这几年很火,在这里我用问答的方式来总结一下使用python的一些常见问题,对自己是个总结,也希望对有同样问题的朋友有帮助.   Q:Python为什么流行? A:Python是一个比较方便 ...