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 天內回覆