Skip to content
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

CI (macos): Work around conflict between pre-installed and Homebrew Python #595

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

mmuetzel
Copy link
Contributor

Installing packages from Homebrew currently fails with an error like the following:

==> Pouring [email protected]_1.ventura.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Error: The `brew link` step did not complete successfully
Could not symlink bin/idle3
Target /usr/local/bin/idle3
already exists. You may want to remove it:
  rm '/usr/local/bin/idle3'

To force the link and overwrite all conflicting files:
  brew link --overwrite [email protected]

To list all files that would be deleted:
  brew link --overwrite [email protected] --dry-run

Possible conflicting files are:
/usr/local/bin/idle3 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/idle3
/usr/local/bin/pydoc3 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/pydoc3
/usr/local/bin/python3 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/python3
/usr/local/bin/python3-config -> /Library/Frameworks/Python.framework/Versions/3.12/bin/python3-config
/usr/local/share/man/man1/python3.1 -> /usr/local/Cellar/[email protected]/3.12.7/share/man/man1/python3.1
/usr/local/lib/pkgconfig/python3-embed.pc -> /usr/local/Cellar/[email protected]/3.12.7/lib/pkgconfig/python3-embed.pc
/usr/local/lib/pkgconfig/python3.pc -> /usr/local/Cellar/[email protected]/3.12.7/lib/pkgconfig/python3.pc
/usr/local/Frameworks/Python.framework/Headers -> /usr/local/Cellar/[email protected]/3.12.7/Frameworks/Python.framework/Headers
/usr/local/Frameworks/Python.framework/Python -> /usr/local/Cellar/[email protected]/3.12.7/Frameworks/Python.framework/Python
/usr/local/Frameworks/Python.framework/Resources -> /usr/local/Cellar/[email protected]/3.12.7/Frameworks/Python.framework/Resources
/usr/local/Frameworks/Python.framework/Versions/Current -> /usr/local/Cellar/[email protected]/3.12.7/Frameworks/Python.framework/Versions/Current
==> /usr/local/Cellar/[email protected]/3.13.0_1/bin/python3.13 -Im ensurepip
==> /usr/local/Cellar/[email protected]/3.13.0_1/bin/python3.13 -Im pip install -v --n
==> Summary
🍺  /usr/local/Cellar/[email protected]/3.13.0_1: 3,253 files, 63.2MB

Force overwriting files from the version of Python that is pre-installed on the macOS runner images. They conflict with the files from Homebrew's versions of Python.

That likely means that this part needs to be updated about once every year (if Python keeps its release schedule of one major version release each year and Homebrew keeps up with that).
If someone with better knowledge of Homebrew has a better solution, please let me know. (Ideally one that doesn't require bumping the Python versions every year...)

…ython.

Force overwriting files from the pre-installed version of Python. They
conflict with the files from Homebrew's versions of Python.
@raback raback merged commit 74348ff into ElmerCSC:devel Oct 17, 2024
6 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants