Python 配置镜像源
1. 查看当前源
pip config get global.index-url
2. 临时变更源
pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
3. 永久变更源
清华(推荐速度最快)
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
百度
pip config set global.index-url https://mirror.baidu.com/pypi/simple
腾讯
pip config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple
中国科学技术大学开源软件镜像站
pip config set global.index-url https://mirrors.ustc.edu.cn/pypi/web/simple
4. 官方镜像源
pip config set global.index-url https://pypi.org/simple
5. 注意
- 第三方镜像源可能出现包或包对应的版本找不到情况,切换一下到其他镜像源就可以了。
管理Python包源:pip配置与常用镜像选择
本文介绍了如何使用pipconfig管理Python包的下载源,包括临时和永久变更index-url,以及推荐的官方镜像和几个知名加速镜像站如清华大学、百度和腾讯的设置方法。
1707

被折叠的 条评论
为什么被折叠?



