设置pip 国内镜像及常用pip源

pip 和easy_install 是两个用来安装常用python 包的工具,但经常下载不了,使用国内镜像。

设置pip 镜像及常用pip源

easy_install

1
easy_install -i http://e.pypi.python.org/simple fabric

或打开pydistutils.cfg

1
vi ~/.pydistutils.cfg

写入以下内容

1
2
[easy_install]
index_url = http://e.pypi.python.org/simple

pip

1
pip -i http://e.pypi.python.org/simple install fabric

打开pip.conf

1
vi ~/.pip/pip.conf

写入以下内容

1
2
[global]
index-url = http://e.pypi.python.org/simple

常用镜像

1
2
3
4
5
6
7
8
9
10
公网:http://e.pypi.python.org/simple
教育网:http://pypi.tuna.tsinghua.edu.cn/simple

以下镜像来自安居客
公网:http://pypi.corp.anjuke.com/simple

http://pypi.douban.com/simple  豆瓣
http://pypi.hustunique.com/  华中理工大学
http://pypi.sdutlinux.org/  山东理工大学
http://pypi.mirrors.ustc.edu.cn/  中国科学技术大学

1
2
3
4
5
6
[global]
timeout = 6000
index-url = http://e.pypi.python.org/simple
[install]
use-mirrors = true
mirrors = http://e.pypi.python.org

本文网址: https://pylist.com/topic/67.html 转摘请注明来源

Suggested Topics

使用国内pip

有些服务器对外网络很坑,幸好国内有好多优秀的源镜像...

Go 语言包国内镜像

无需 Git 和 Hg 等版本管理工具,就可以下载指定版本的 Go 语言包 https://gopm.io/...

Markdown 快速入门,掌握常用格式

Markdown 是一种轻量级标记语言,它允许人们使用易读易写的纯文本格式编写文档。如果你没接触过Markdown 可以继续往下看,可以快速入门并掌握一些常用的写法。...

python编程中常用的12种基础知识总结

python编程中常用的12种基础知识总结:正则表达式替换,遍历目录方法,列表按列排序、去重,字典排序,字典、列表、字符串互转,时间对象操作,命令行参数解析(getopt),print 格式化输出,进制转换,Python调用系统命令或者脚本,Python 读写文件。...

go struct 设置默认值

在 Golang 中,我们经常碰到要设置一个结构体的默认值,但 Golang 没有较好的方式实现这功能,需要通过其它方式实现,其效果也比较优雅。...

OpenWrt 国内

国内可用 OpenWrt 镜像,都同步更新到 openwrt 最新版...

Leave a Comment