PIP command accelerates online installation using a domestic pypi image source

Source: Internet
Author: User

Reference: http://www.cnblogs.com/yudar/p/4444097.html

Installing third-party libraries with Easy_install and Pip is convenient
They are actually downloaded from the official Python source Pypi.python.org/pypi to the local, then unpacked and installed.
But for some reason, access to the official PyPI is unstable, slow or even inaccessible.
As with Ubuntu's apt and CentOS's yum, there are various image sources like PyPI.

PIPY Domestic Mirror currently has:

http://pypi.douban.com/Watercress

http://pypi.hustunique.com/Huazhong University of Technology

http://pypi.sdutlinux.org/Shandong University of Technology

http://pypi.mirrors.ustc.edu.cn/China University of Science and Technology

This is a convenient way to install the PIP online, but it's a terrible thing to do when the network is unstable. The use of domestic mirrors is relatively good,

If you want to specify the source manually, you can specify the source by following the PIP with-I, such as installing the web.py frame with the source of the watercress:

Pip Install Web.py-i http://pypi.douban.com/simple

Note that there is a/simple directory behind!!!


The source of the highly recommended watercress in the country
http://pypi.douban.com/simple/
Note that there are/simple directories to follow.

Using the image source is simple, specifying it with-I is OK:
Easy_install-i http://pypi.douban.com/simple/gevent
Pip Install-i http://pypi.douban.com/simple/gevent

If it feels too troublesome, it can be formulated as default:
Under Linux, modify the ~/.pip/pip.conf, if not this file is created.
Under Windows, modify%homepath%\pip\pip.ini.
The contents are:
[Global]
Index-url = Http://pypi.douban.com/simple

This source is used by default when you use Pip to install.

The command is as follows:

sudo pip install scipy==0.10.1-i http://pypi.douban.com/simple--trusted-host pypi.douban.com

PIP command accelerates online installation using a domestic pypi image source

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.