执行如下命令行
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
出现
ERROR: Unable to save configuration. Please report this as a bug.
Traceback (most recent call last):
File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\site-packages\pip_internal\commands\configuration.py”, line 267, in _save_configuration
self.configuration.save()
File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\site-packages\pip_internal\configuration.py”, line 213, in save
with open(fname, “w”) as f:
PermissionError: [Errno 13] Permission denied: ‘C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\pip.ini’
ERROR: Internal Error.
请确保以管理员身份运行CMD,如果还是不行可能是一个pip bug,就输入以下命令: python3 -m pip config
set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple --user

如上,执行成功,秒下否则执行等待时间超过23小时
PYTHON成功安装国内镜像源