国内镜像 ubuntu pip CRAN CPAN

由于默认的源进行安装时,下载速度比较慢,最好切换为国内镜像;

国内镜像:

清华大学开源软件镜像站  https://mirrors.tuna.tsinghua.edu.cn/

中国科学技术大学  http://mirrors.ustc.edu.cn/

浙江大学开源镜像站  http://mirrors.zju.edu.cn/

阿里云开源镜像站  http://mirrors.aliyun.com/

腾讯开源镜像站  http://mirrors.cloud.tencent.com/

网易开源镜像站  http://mirrors.163.com/

搜狐开源镜像  http://mirrors.sohu.com/

豆瓣开源镜像站  http://pypi.douban.com/simple/

 

以清华大学镜像为例:

 

 

 

 

 

 

1、临时变更

python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pandas

2、永久变更

修改 ~/.pip/pip.conf 的内容为:

[global]
index-url=https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com

3、pip 升级

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

 

posted on 2022-08-09 18:10  0820LL  阅读(181)  评论(0编辑  收藏  举报

导航