setup-python fails on self-hosted macOS: newer darwin Python assets require interactive sudo (installer -pkg)
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 30/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- github-actions, macos, shell, typescript
调研方向
The failing sudo installer -pkg call comes from the generated setup.sh, built from installers/macos-pkg-setup-template.sh (line 50) in actions/python-versions, so that template is the first file to read. The error surfaces in setup-python's install-from-prebuilt-package step, which is where an explicit failure message would go. Done means either a documented sudo requirement or a clear error for the no-TTY case, and the maintainers still need to decide whether a relocatable layout is in scope.
由索引模型根据 Issue 内容生成。
描述
Problem
On a self-hosted macOS runner, actions/setup-python@v7 fails for Python versions whose darwin asset installs via sudo installer -pkg (e.g. 3.12.10):
Version 3.12 was not found in the local cache
Download from .../python-3.12.10-darwin-arm64.tar.gz
Execute installation script
Check if Python hostedtoolcache folder exist...
Install Python binaries from prebuilt package
##[error]sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
The asset's setup.sh (generated from actions/python-versions installers/macos-pkg-setup-template.sh, line 50) runs:
sudo installer -pkg $PYTHON_PKG_NAME ... -target /
The runner service user has no TTY, so any host without passwordless sudo for /usr/sbin/installer fails. Older assets (e.g. 3.11.9) shipped plain directory trees and installed unprivileged.
Suggestion
Document the sudo requirement and/or fail with an explicit message; a relocatable (unprivileged) darwin asset layout would remove the requirement entirely.
Related: #914, #1387.
🤖 Generated with Claude Code
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 752
- 平均合并
- 22 天 15 小时
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
actions/setup-python 的其他 Issue
-
bug needs triage
难度 3/5 1-2 天 新手友好度 32/100
actions/setup-python#1392 · 1 条评论 · 4 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 57/100
actions/setup-python#1390 · 2 条评论 ·
-
standard pip version is below 26.2.2可能已有人在做 @v-gowridurgad 于 21 天前认领。 未关闭bug
难度 4/5 3-5 天 新手友好度 38/100
actions/setup-python#1380 · 11 条评论 · 已指派 1 人 ·
-
Python 3.15.0 on Ubuntu is missing the C _decimal module可能已有人在做 @v-gowridurgad 于 29 天前认领。 未关闭bug
actions/setup-python#1376 · 1 条评论 · 1 个 reaction · 已指派 1 人 ·
-
bug
难度 4/5 3-5 天 新手友好度 55/100
actions/setup-python#1348 · 6 条评论 ·
查看 actions/setup-python 的全部 Issue
相似的 Issue
-
db-d1-sqlite: upsert is aliased to updateOne, so payload.kv.set never inserts new keys可能已有人在做 @pcbeingused333 今天认领。 未关闭Bug db: d1-sqlite Payload OSS
难度 2/5 1-3 小时 新手友好度 76/100
payloadcms/payload#19766 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
device-management-toolkit/sample-web-ui#3711 ·
维护者通常 1 天内回复
-
bug impact:low Team: SecuritySolution Team:Defend Workflows v9.6.0
难度 2/5 1-3 小时 新手友好度 72/100
elastic/kibana#306401 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
agentes-chat/agentes-chat#927 ·
维护者通常 1 天内回复
-
Closing a pinned tab jumps to the Tabs section instead of the next open pinned tab可能已有人在做 @seenimohamed 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
ardia-browser/ardia#2769 ·
维护者通常 1 天内回复