Official documents:
https://pip.pypa.io/en/stable/user_guide/#configuration
As an example:
Windows users want to change the PyPI source, you can create a new PIP folder under the%appdata% directory, and then create a new Pip.ini under the Pip folder.
(If a folder or file already exists in the path, you do not have to create it, and you can enter "Echo%appdata%" under CMD to see where the path%appdata% represents)
Of course, you can also create a new one under%home%, perhaps you have other needs, may also be in%virtual_env% or C:\Documents and settings\ or C:\ProgramData\ new in the directory.
Specific differences can be viewed by clicking on the Official document link above.
If you want to use Tsinghua University's PyPI source, then the contents of the Pip.ini file can be written like this:
[Global]index-url = Https://pypi.tuna.tsinghua.edu.cn/simple
You can also view the PyPI help documentation for Tsinghua University: https://mirrors.tuna.tsinghua.edu.cn/help/pypi/
Where is the configuration file path for the PIP for Python? How do I modify the PyPI source?