6

Pythoner的福利,豆瓣的PyPI源

 2 years ago
source link: https://www.isaced.com/post-228.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Pythoner的福利,豆瓣的PyPI源

Python下用的最多的包安装工具就是easy_install和pip,但是他们都是从Python官方的Pypi源上寻找并下载资源,由于国内网络原因,有时候连接和速度就不是那么理想,跟淘宝的RubyGems镜像源一样,于是便有了国内的PyPi镜像源,如今天说的豆瓣PyPi镜像。

豆瓣PyPi镜像:http://pypi.douban.com/simple/

使用方法:

sudo easy_install -i http://pypi.douban.com/simple/ flask 
sudo pip install -i http://pypi.douban.com/simple/ flask

要配制成默认的话,需要创建或修改配置文件(linux的文件在~/.pip/pip.conf,windows在%HOMEPATH%\pip\pip.ini),修改内容为:

[global]
index-url = http://pypi.douban.com/simple

然后用pip的时候自动就会用此镜像源了

另附上一个阿里云的PyPi源:http://mirrors.aliyun.com/pypi/simple/


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK