brew update followed by brew upgrade fails for Python's 2to3 conflict (December 2022)
See original GitHub issueDescription
If one has on a job:
brew update
brew upgrade
the job fails with error:
==> Upgrading python@3.10
3.10.8 -> 3.10.9
==> Pouring python@3.10--3.10.9.big_sur.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3
Target /usr/local/bin/2to3
already exists. You may want to remove it:
rm '/usr/local/bin/2to3'
To force the link and overwrite all conflicting files:
brew link --overwrite python@3.10
To list all files that would be deleted:
brew link --overwrite --dry-run python@3.10
Possible conflicting files are:
/usr/local/bin/2to3 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/2to3
/usr/local/bin/idle3 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/idle3
/usr/local/bin/pydoc3 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/pydoc3
/usr/local/bin/python3 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/python3
/usr/local/bin/python3-config -> /Library/Frameworks/Python.framework/Versions/3.11/bin/python3-config
This is similar to old issues:
- https://github.com/actions/runner-images/issues/2322
- https://github.com/actions/runner-images/issues/4020
Platforms affected
- Azure DevOps
- GitHub Actions - Standard Runners
- GitHub Actions - Larger Runners
Runner images affected
- Ubuntu 18.04
- Ubuntu 20.04
- Ubuntu 22.04
- macOS 11
- macOS 12
- Windows Server 2019
- Windows Server 2022
Image version and build link
Image Version: 20221215.1 Link: https://github.com/traversaro/github-actions-brew-update-upgrade-check/actions/runs/3742142787
Is it regression?
20221211.1
Expected behavior
The brew upgrade
should exit fine.
Actual behavior
The brew upgrade
fails with the error message in the top of the issue.
Repro steps
Issue Analytics
- State:
- Created 9 months ago
- Reactions:2
- Comments:26 (9 by maintainers)
Top Results From Across the Web
brew update followed by brew upgrade fails for Python's 2to3 ...
Description If one has on a job: brew update brew upgrade the job fails with error: ==> Upgrading python@3.10 3.10.8 -> 3.10.9 ==>...
Read more >How to link home brew python version and set it as default
After installing python3 with brew install python3 I was getting the error: Error: An unexpected error occurred during the `brew link` step The...
Read more >How to upgrade from python 2.7 to python 3.1 on macOS Mojave
I have tried to install python 3 both via homebrew and the python website. Neither works. When trying through homebrew I got: ➜...
Read more >trying to install php fails because of python dependency?
I just wanted to install php on Mac ... To force the link and overwrite all conflicting files: brew link --overwrite python@3.8 To...
Read more >Install OpenCV 4 on macOS - PyImageSearch
This guide will show you how to install OpenCV 4 with Python bindings on your macOS machine using my easy to follow, step-by-step...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any chance to have it fixed in the image? All was working before, I wouldn’t want to use any workarounds.
I’ve transferred the issue to the actions/setup-python repo as the most relevant place.