Configuring Python Mirror Acceleration (Using the ServBay Control Panel)
Python Mirror Configuration Guide
ServBay offers convenient Python mirror configuration features that allow you to easily switch between different PyPI mirror sources, significantly improving pip package installation speed.
Accessing the Configuration Interface
- Open the ServBay control panel.
- In the left navigation bar, select
Languages
>Python Config
. - In the right area, locate the
Pip Mirror
configuration section.
Available Mirror Source Options
ServBay comes with several commonly used mirror sources:
- √ Pypi (default official source):
https://pypi.org/simple
- Tsinghua University:
https://pypi.tuna.tsinghua.edu.cn/simple
- USTC (University of Science and Technology of China):
https://pypi.mirrors.ustc.edu.cn/simple
- Aliyun (Alibaba Cloud):
https://mirrors.aliyun.com/pypi/simple
- Tencent Cloud:
https://mirrors.cloud.tencent.com/pypi/simple
- Huawei Cloud:
https://repo.huaweicloud.com/repository/pypi/simple
- SUSTech (Southern University of Science and Technology):
https://mirrors.sustech.edu.cn/pypi/simple
- NetEase:
https://mirrors.163.com/pypi/simple
- Custom (custom source)
Configuration Steps
- Select the required mirror source from the radio buttons.
- For custom sources, choose
Custom
and enter the mirror URL. - Click the
Save
button in the bottom right corner to save the configuration. - To restore default settings, click the
Reset
button.
Verifying Configuration
After completing the configuration, you can verify it with the following command:
bash
pip config get global.index-url
1
Or try installing a test package:
bash
pip install numpy
1
Important Notes
- The mirror configuration will globally affect all Python projects in the current environment.
- Some private packages may require using the official source.
- The synchronization frequency of different mirror sources may vary slightly.
- It is recommended to choose the geographically closest mirror source for optimal speed.
This feature from ServBay makes configuring the Python development environment simpler and more efficient, particularly beneficial for developers.