homebrew-osgeo4mac: QGIS-3 install: couldn't load SIP module -- PqQt5 problem?

I just installed QGIS3 (3.4.0) using brew install qgis3 on Mac (High Sierra 10.13.6). No errors, but a warning: osgeo/osgeo4mac/qgis3 dependency gcc was built with a different C++ standard library (libstdc++ from clang). This may cause problems at runtime.

When I open /usr/local/opt/qgis3/QGIS.app, I get the error: Couldn't load SIP module. Python support will be disabled. The error message says ModuleNotFoundError: No module named 'PyQt5.QtCore'. [full text below]

Based on some other issues, I checked and got the following: Already linked: /usr/local/Cellar/pyqt/5.10.1_1 osgeo/osgeo4mac/pyqt5-webkit 5.10.1 is already installed and up-to-date osgeo/osgeo4mac/qt5-webkit 5.11.2 is already installed and up-to-date

Not sure if relevant, but I had to brew unlink pyqt-qt4 before installing qgis3.

Ideas?

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/Cellar/qgis3/3.4.0/QGIS.app/Contents/MacOS/../Resources/python/qgis/__init__.py", line 72, in 
    from qgis.PyQt import QtCore
  File "/usr/local/Cellar/qgis3/3.4.0/QGIS.app/Contents/MacOS/../Resources/python/qgis/PyQt/QtCore.py", line 26, in 
    from PyQt5.QtCore import *
ModuleNotFoundError: No module named 'PyQt5.QtCore'


Python version:
3.7.0 (default, Oct  2 2018, 09:20:07) 
[Clang 10.0.0 (clang-1000.11.45.2)]

QGIS version:
3.4.0-Madeira 'Madeira', exported

Python path:
['/usr/local/Cellar/qgis3/3.4.0/QGIS.app/Contents/MacOS/../Resources/python', '~/Library/Application Support/QGIS/QGIS3/profiles/default/python', '~/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins', '/usr/local/Cellar/qgis3/3.4.0/QGIS.app/Contents/MacOS/../Resources/python/plugins', '/usr/local/opt/gdal2-python/lib/python3.7/site-packages', '/usr/local/opt/qgis3/lib/python3.7/site-packages', '/usr/local/opt/qgis3/libexec/vendor/lib/python3.7/site-packages', '/usr/local/Cellar/qgis3/3.4.0/libexec/vendor/lib/python3.7/site-packages', '/Users/steven', '/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload']```

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 3
  • Comments: 23 (3 by maintainers)

Most upvoted comments

No issues here either – as I said, I was able to resolve the problem by running brew switch to the correct, latest version of the dependency. Everything is working great now. Thanks for the hard work @fjperini!

Thank you @fjperini , everything is fine for me since the last big reorganization you did recently. All the problems were solved. Thank you again very much !

@BorisDess homebrew is a package manager for macOS. in the git repository of QGIS you can find support for the problems that you are having in windows.

@eldang @dd-a @jonathanmccormack If you need more support, you can contact me through the space we have in slack.

@sirosenberg @fghorow @Wicky2k8 @joh10891 updated formula. With all the restrictions there should no longer be any problem with these modules. If it fails for the same reason, it is because you need to check your Homebrew. if it is compiled in Travis CI, it should be built on any machine.

A bottle will be built, if you only install qgis it without extra supports, you will not need to build. This issue closes, if the problem persists we can reopen it.

I fixed a similar problem (see https://github.com/OSGeo/homebrew-osgeo4mac/issues/607#issuecomment-460920980) with:

$ brew reinstall ninja gsl sip six bison flex pkg-config python qt pyqt qscintilla2
$ brew link --overwrite pyqt

Worth a try.

Any word?