Home>Article>Backend Development> How to set up Tsinghua source with pip
Setting method: 1. Open a terminal or command prompt window; 2. Run the "touch ~/.pip/pip.conf" command to create a configuration file named pip; 3. Open the pip.conf file , and then add the content "[global];index-url = https://pypi.tuna.tsinghua.edu.cn/simple", which will set the mirror source of pip to that of Tsinghua University; 4. Save and close Just file.
The operating system for this tutorial: Windows 10 system, Python version 3.11.4, Dell G3 computer.
To set pip to use the mirror source of Tsinghua University, you can follow the following steps:
1. First, open a terminal or command prompt window.
2. Run the following command to create a configuration file named pip (skip this step if it already exists):
touch ~/.pip/pip.conf
3. Open the pip.conf file, and create a new one if it does not exist. One, and then add the following content:
[global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple
This will set the mirror source of pip to the mirror source of Tsinghua University.
4. Save and close the file.
Now, your pip will use Tsinghua University’s mirror source to download Python packages and libraries. This setting can speed up downloads and improve stability.
Everyone is watching recently
[shoudongurl]Use Pip to set up Tsinghua source and optimize the download speed of Python packages[/shoudongurl]
[shoudongurl]How does pip specify the source installation[/shoudongurl]
[shoudongurl]How does pip view the source[/shoudongurl]
The above is the detailed content of How to set up Tsinghua source with pip. For more information, please follow other related articles on the PHP Chinese website!