Skip to content

brew upgrade fails for Python's 2to3 conflict  #2322

@traversaro

Description

@traversaro

Description
If I run the commands brew update and brew upgrade, the job fails. This is similar to #2248 and #1811, but the specific error is different and is probably due to some other Python being installed.

Area for Triage:

Question, Bug, or Feature?:
Bug

Virtual environments affected

  • Ubuntu 16.04
  • Ubuntu 18.04
  • Ubuntu 20.04
  • macOS 10.15
  • macOS 11.0
  • Windows Server 2016 R2
  • Windows Server 2019

Expected behavior
I would expect that brew upgrade works fine.

Actual behavior
brew upgrade is failing with error:

2020-12-21T12:59:17.7407310Z The formula built, but is not symlinked into /usr/local
2020-12-21T12:59:17.7430550Z Could not symlink bin/2to3
2020-12-21T12:59:17.7443870Z Target /usr/local/bin/2to3
2020-12-21T12:59:17.7446720Z already exists. You may want to remove it:
2020-12-21T12:59:17.7452220Z   rm '/usr/local/bin/2to3'
2020-12-21T12:59:17.7482600Z 
2020-12-21T12:59:17.7485390Z To force the link and overwrite all conflicting files:
2020-12-21T12:59:17.7547210Z   brew link --overwrite python@3.9
2020-12-21T12:59:17.7599790Z 
2020-12-21T12:59:17.7652130Z To list all files that would be deleted:
2020-12-21T12:59:17.7663330Z   brew link --overwrite --dry-run python@3.9
2020-12-21T12:59:17.7667290Z 
2020-12-21T12:59:17.7678030Z Possible conflicting files are:

Repro steps

Run the following commands in a macos image:

  • brew update
  • brew upgrade

See https://github.com/traversaro/github-actions-brew-update-upgrade-check/actions/runs/435789601 for a minimal job that is failing.

Metadata

Metadata

Labels

Area: PythonOS: macOSawaiting-deploymentCode complete; awaiting deployment and/or deployment in progressinvestigateCollect additional information, like space on disk, other tool incompatibilities etc.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions