I am trying to talk to the PyQGIS API for use in a 3rd party application using the offical .dmg image provided on the QGIS homepage.
After setting PYTHONPATH
to /Applications/QGIS3.4.app/Contents/Resources/python
and initializing everything as stated in https://docs.qgis.org/3.4/en/docs/pyqgis_developer_cookbook/intro.html#using-pyqgis-in-custom-applications, I am facing the following error when running from PyQt5.QtGui import
or from qgis import *
:
ImportError: dlopen(/Applications/QGIS3.4.app/Contents/Resources/python/PyQt5/QtGui.so, 2): Library not loaded: @executable_path/../Frameworks/QtGui.framework/QtGui
Referenced from: /Applications/QGIS3.4.app/Contents/Resources/python/PyQt5/QtGui.so
Reason: image not found
Looks like I need to set some linkers or similar?
Side facts:
- I have no problems when using the homebrew
version of QGIS).
- I am on macOS 10.14.6 (Mojave)