" to the opened configuration file; 3. Save the modifications file and exit the editor; 4. In the terminal or command line, enter the "pip install Home >Backend Development >Python Tutorial >How to configure pip domestic source The configuration steps of pip domestic source are as follows: 1. Enter the "pip config edit" command to open the pip configuration file; 2. Add "index-url = # Operating system for this tutorial: Windows 10 system, Dell G3 computer. In China, using the default pip source to download Python packages may be subject to network restrictions, resulting in slow download speeds or inability to connect. In order to solve this problem, you can configure the domestic pip source to speed up the download. The following are some commonly used domestic pip sources: The following are the steps to configure the pip source: or or according to your Configure the selected source. Save and close file: Save the modified file and exit the editor. Test whether it is successful: In the terminal or command line, enter the following command to test whether the pip source is successfully configured: Among them, "Package name" is the name of the Python package you want to install. If the download speed is fast and the package is successfully installed, the pip source has been successfully configured. The above is the detailed content of How to configure pip domestic source. For more information, please follow other related articles on the PHP Chinese website!How to configure pip domestic source
pip config edit
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[global]
index-url = http://pypi.douban.com/simple/
pip install 包名