I am trying to use QGIS3.4 by using Emacs (elpy) on Mac OS Mojava. I checked following sources:
- https://docs.qgis.org/3.4/pdf/en/QGIS-3.4-PyQGISDeveloperCookbook-en.pdf
- http://osgeo-org.1560.x6.nabble.com/Error-importing-qgis-in-python-td4141685.html
- Calling QGIS from MacOS python
Then, I use the following code:
import os
import sys
sys.path.append('/Applications/QGIS3.4.app/Contents/Resources/python/')
sys.path.append('/Applications/QGIS3.4.app/Contents/Resources/python/plugins')
sys.path.append('/Applications/QGIS3.4.app/Contents/MacOS/lib')
import qgis.core
But, I got the following result.
ImportError: dlopen(/Applications/QGIS3.4.app/Contents/Resources/python/qgis/_core.so, 2): Library not loaded: @executable_path/../Frameworks/qgis_core.framework/qgis_core
Referenced from: /Applications/QGIS3.4.app/Contents/Resources/python/qgis/_core.so
Reason: image not found
Could you help me to resolve this issue?
-
Hi, unfortunately i don't have the answer, but i'm having the same troubles. Wondering if you found a solution for this?Snowman– Snowman2020年06月03日 06:58:36 +00:00Commented Jun 3, 2020 at 6:58
-
I don't have an answer yet. But, I think this problem is related to multiple versions of python on my computer. So I tried to uninstall my original python. If so, I can see some progress. But, it does not work still.hiroaki– hiroaki2020年06月04日 12:02:39 +00:00Commented Jun 4, 2020 at 12:02
lang-py