I am trying to install Geant4 dependencies and one of them is Qt5. I used Homebrew to install it.
brew install qt@5
After waiting 2 hours, brew didn't install Qt5.
==> /usr/local/opt/[email protected]/libexec/bin/python -m pip install .
Last 15 lines from /Users/kaan/Library/Logs/Homebrew/python-packaging/03.python:
File "/usr/local/Cellar/[email protected]/3.12.0/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
File "<frozen importlib._bootstrap>", line 1304, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
File "<frozen importlib._bootstrap>", line 1318, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'flit_core'
[notice] A new release of pip is available: 23.2.1 -> 23.3.1
[notice] To update, run: python3.12 -m pip install --upgrade pip
Do not report this issue to Homebrew/brew or Homebrew/homebrew-core!
Error: You are using macOS 10.15.
We (and Apple) do not provide support for this old version.
It is expected behaviour that some formulae will fail to build in this old version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from Homebrew or its maintainers on social media.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.
I tried MacPorts for installation:
sudo port install qt5
But it didn't work either, and I got this error:
Continue? [Y/n]: Y
---> Fetching archive for qt5-qtsvg
---> Attempting to fetch qt5-qtsvg-5.15.8_0.darwin_19.x86_64.tbz2 from https://packages.macports.org/qt5-qtsvg
---> Attempting to fetch qt5-qtsvg-5.15.8_0.darwin_19.x86_64.tbz2 from https://fra.de.packages.macports.org/qt5-qtsvg
---> Attempting to fetch qt5-qtsvg-5.15.8_0.darwin_19.x86_64.tbz2 from https://nue.de.packages.macports.org/qt5-qtsvg
---> Configuring qt5-qtsvg
Error: Failed to configure qt5-qtsvg: configure failure: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt5/qt5-qtsvg/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there
is a bug.
Error: Processing of port qt5 failed
To install Qt5 on macOS Catalina, you can use Homebrew, a popular package manager for macOS. Follow these steps:
Install Homebrew: Open Terminal and run the following command:
bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Tap the Qt Tap: Tap the Qt tap to get access to the Qt formulas:
bash brew tap cartr/qt5
Install Qt5: Install Qt5 using the following command:
bash brew install qt@5
Set Environment Variables: Homebrew will provide instructions on how to set the necessary environment variables. Follow those instructions, or you can add the following lines to your shell profile file (e.g., ~/.bash_profile or ~/.zshrc): bash
export PATH="/usr/local/opt/qt@5/bin:$PATH" export LDFLAGS="-L/usr/local/opt/qt@5/lib" export CPPFLAGS="-I/usr/local/opt/qt@5/include"
After updating your profile, either restart your terminal or run source ~/.bash_profile (or the respective file for your shell).
Verify Installation: Check if Qt5 is installed successfully by running: bash
qmake --version
This should display the version information of the installed Qt.
Remember to adapt the instructions if you're using a different shell or have a different setup.