Python更换pip镜像源
pip是一个Python包管理工具,这里记录下更换pip源来加快第三方库的下载速度
使用方式
临时使用
以清华源下载 request 库为例
1 | pip3 install request -i https://pypi.tuna.tsinghua.edu.cn/simple |
设置默认源
1 | pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple |
镜像源地址
1 | 清华:https://pypi.tuna.tsinghua.edu.cn/simple |
扩展
建议使用 pipenv 替代pip