-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre-installed Python conflicts with Homebrew Python on macOS #9966
Comments
Hello @bebound, this issue should be fixed after the next image release. |
@Alexey-Ayupov May I know which PR fixes this? |
Hello @bebound ! A little (not exactly true 😄) clarification. @Alexey-Ayupov meant that the problem would resolve itself with updating the macOS images until We will do some more research on what can be done in a way not to break existed workflows and welcome any ideas from you as a user. |
I prefer let homebrew overwrite
Also, if this possible to pre-install brew's Out of curiosity, which line creates the soft link from |
It seems like this is slowly rolling out to more runners. |
Oh, and it's back again now that Homebrew released Python 3.12.5, but the images are on an older version. It's also affecting both Azure and GitHub Actions now. The annoying thing is that we aren't even using the Homebrew Python, but the one from |
1.openvdb debug mode build fail; 2.github action macos build error, rm '/usr/local/bin/2to3-3.11' actions/runner-images#9966 3.Modify the wrong trigger CI branch option jira:nojira
If Python is installed/updated without "--overwrite", conflict errors occur because Homebrew tries to replace existing files like "/usr/local/bin/2to3". See also: - actions/runner-images#9966
Description
In macOS 12 and 13, it has pre-installed Python
/Library/Frameworks/Python.framework/Versions/3.xx/
, which creates soft link such as/usr/local/bin/2to3-3.xx
. Homebrew'spython@3.xx
also wants to create this link.This causes issue when there is new Python is released, and
brew install xx
tries to install the latest Python: see Homebrew/homebrew-core#165793 (comment)Runner image has a fix for Python 2.7:
runner-images/images/macos/scripts/build/install-python.sh
Lines 17 to 25 in 9d5d1be
It used to let brew overwrite the
python@3.11
soft link to resolve the conflict, but is removed in https://github.com/actions/runner-images/pull/8452/files#diff-5490845eec9cd46fa52e10c62bd6ec6a76c27f17a338963a508414efd8b2252dR33-R34Now I have to run
brew unlink python@3.11 && brew link --overwrite python@3.11
before usingbrew install xxx
to eliminate the potential conflict. It's tedious.There is a PR attempting to address this issue: #7710, but it was rejected. Regardless of whether the fix should be implemented in
actions/setup-python
, we are still facing this issue one year later. I believe the runner image should consider providing a temporary fix for this.Related issue:
Homebrew/homebrew-core#173191
Azure/azure-cli#29054
Platforms affected
Runner images affected
Image version and build link
This could be reproduced by reinstalling
python@3.11
https://github.com/bebound/starter-workflows/actions/runs/9298969591/job/25591905178
Is it regression?
Yes?
Expected behavior
Successfully install
python@3.11
with brew.Actual behavior
Repro steps
brew uninstall azure-cli
brew install python@3.11
The text was updated successfully, but these errors were encountered: