Use a domestic image source to accelerate the installation of Python PyPI packages

Source: Internet
Author: User

The default PIP is to use the official Python source, but because the foreign official source is often the wall, resulting in unavailability, we can use the domestic Python image source, to solve the problem of Python installation not on the library.

There are many sources available online, for example: Watercress: http://pypi.douban.com/simple/Tsinghua: Https://pypi.tuna.tsinghua.edu.cn/simple

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

1, temporary use, only use the specified source when installing pillow

PIP3 install-i Https://pypi.tuna.tsinghua.edu.cn/simple Pillow

2, permanent modification, once and for all

Under Linux, modify ~/.pip/pip.conf (without creating one), modify Index-url to tuna as follows: [Global] Index-url = https://pypi.tuna.tsinghua.edu.cn/ Simple windows, create a PIP directory directly in the user directory, such as: C:\Users\xx\pip, new file Pip.ini, the following: [global] Index-url = https:// Pypi.tuna.tsinghua.edu.cn/simple

  

Use a domestic image source to accelerate the installation of Python PyPI packages

Related Article

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.