You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
setup-python fails on self-hosted macOS: newer darwin Python assets require interactive sudo (installer -pkg) #1388
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:
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.
Thanks for reporting this and suggesting improvements.
As noted in #1306, macOS .pkg installation requires elevated privileges. Pre-installing the required Python version in the tool cache can avoid installation during the workflow. this sudo requirement is not specific to Python 3.12; it also applies to other package-based macOS versions, including Python 3.11.9, please check the discussion in #760
Thanks also for PR #1387. It addresses the related custom cache-path issue, but not the sudo requirement.
Activity
v-mahabaleshwars commentedon Nov 16, 2026
Thanks for reporting this and suggesting improvements.
As noted in #1306, macOS .pkg installation requires elevated privileges. Pre-installing the required Python version in the tool cache can avoid installation during the workflow. this sudo requirement is not specific to Python 3.12; it also applies to other package-based macOS versions, including Python 3.11.9, please check the discussion in #760
Thanks also for PR #1387. It addresses the related custom cache-path issue, but not the sudo requirement.
docs: explain macOS self-hosted installer permissions