question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

brew update followed by brew upgrade fails for Python's 2to3 conflict (December 2022)

See original GitHub issue

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 

==> 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:

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

See https://github.com/traversaro/github-actions-brew-update-upgrade-check/blob/2fa847c627c643716ba10d681ea18c86c0b54dec/.github/workflows/brew-update.yml for a MWE .

Issue Analytics

  • State:open
  • Created 9 months ago
  • Reactions:2
  • Comments:26 (9 by maintainers)

github_iconTop GitHub Comments

6reactions
igagiscommented, Dec 23, 2022

Any chance to have it fixed in the image? All was working before, I wouldn’t want to use any workarounds.

2reactions
mikhailkoliadacommented, Dec 26, 2022

I’ve transferred the issue to the actions/setup-python repo as the most relevant place.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found