I tried the install myself with
Code: Select all
brew install freecad/freecad/freecad --build-from-source --HEAD --verbose
I --force removed python3.10 and made sure, only python3.9 is installed and linked:
Code: Select all
$ brew uninstall python@3.10
Error: Refusing to uninstall /opt/homebrew/Cellar/python@3.10/3.10.2
because it is required by certbot, coin3d, llvm, llvm@11, pyside2@5.15.2, pyside@2, shiboken2@5.15.2 and sphinx-doc, which are currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies python@3.10
$ brew uninstall --ignore-dependencies python@3.10
Uninstalling /opt/homebrew/Cellar/python@3.10/3.10.2... (3,145 files, 57.2MB)
$ which python3 && python3 --version
/opt/homebrew/bin/python3
Python 3.9.10
$ ls -al /opt/homebrew/bin/python3
lrwxr-xr-x 1 dirkolbrich admin 39 23 Mär 10:00 /opt/homebrew/bin/python3 -> ../Cellar/python@3.9/3.9.10/bin/python3
And the shiboken2@5.15.2 dependency itself also depends on llvm (which in turn depends on python3.10). Shiboken builds from source while specifying llvm as it compiler, thus setting python3.10 for its executable. But further down the line specifies the python3.9 libraries to use.
In conclusion: the current homebrew-freecad formulae is broken, as its dependencies and sub-dependencies all have mismatching reliance on different python versions. What a mess.
Meanwhile you can build FreeCAD directly from source. I succeed on an M1 machine with that. Can later try with an Intel machine if you need help.
---
Note: Do you have xcode-select? Please check with Xcode-select -v, otherwise please install with
Code: Select all
Xcode-select --install