零度星河
返回
发布于 更新于 阅读:128 评论:0

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

以Django为例 安装时指定 执行命令 python -m pip install Django -i https://pypi.tuna.tsinghua.edu.cn/simple/ 永久生效

以Django为例

  • 安装时指定
  • 执行命令 python -m pip install Django -i https://pypi.tuna.tsinghua.edu.cn/simple/

永久生效

1
2
3
4
# 设置默认镜像源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/
# 设置信任主机
pip config set global.trusted-host pypi.tuna.tsinghua.edu.cn
评论 (0)
暂无评论 来抢沙发吧~

目录

SpringWonderland

探索 Spring 生态的奇妙世界

2025-10-08 17:41

我的标签

随笔分类

归档

查看完整归档 →