1.解决方法
下载时在代码中间加入
-i https://pypi.tuna.tsinghua.edu.cn/simple
- 例:原本是 pip install pygame
- 改为下面格式:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pygame
2.实现原理
python使用pip下载慢大多数情况下都是因为用了国外的镜像,所以速度会出现减慢以及传输不稳定的情况
加入-i https://pypi.tuna.tsinghua.edu.cn/simple
相当于使用了清华大学的源,因此速度会噌噌噌的往上飞