1、更新Pip
python -m pip install --upgrade pip

2、永久换源(阿里)
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

3、临时换源(阿里)
pip install markdown -i https://mirrors.aliyun.com/pypi/simple/
4、验证源是否生效
pip config list

5、恢复默认源
删除配置文件或运行:
pip config unset global.index-url