Python 安装依赖包时指定国内镜像源

以Django为例

永久生效

# 设置默认镜像源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/
# 设置信任主机
pip config set global.trusted-host pypi.tuna.tsinghua.edu.cn
posted @ 2025-10-08 17:41  程序员の奇妙冒险  阅读(4)  评论(0)    收藏  举报