2

Couldn't load plugin 'Qgis2threejs' due to an error when calling its classFactory() method.

ModuleNotFoundError: No module named 'osgeo' 
Traceback (most recent call last):
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 337, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/Users/indyatblake/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Qgis2threejs/__init__.py", line 27, in classFactory
    from .qgis2threejs import Qgis2threejs
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/indyatblake/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Qgis2threejs/qgis2threejs.py", line 29, in 
    from .q3dviewercontroller import Q3DViewerController
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/indyatblake/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Qgis2threejs/q3dviewercontroller.py", line 23, in 
    from .export import ThreeJSExporter
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/indyatblake/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Qgis2threejs/export.py", line 28, in 
    from .exportdem import DEMLayerExporter
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/indyatblake/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Qgis2threejs/exportdem.py", line 30, in 
    from .propertyreader import DEMPropertyReader
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/indyatblake/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Qgis2threejs/propertyreader.py", line 27, in 
    from .qgis2threejscore import calculateDEMSize
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/indyatblake/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Qgis2threejs/qgis2threejscore.py", line 25, in 
    from osgeo import gdal
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'osgeo'


Python version: 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 03:03:55) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] 
QGIS version: 3.2.2-Bonn Bonn, exported 

Python Path:
/Applications/QGIS3.app/Contents/MacOS/../Resources/python
/Users/indyatblake/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/indyatblake/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
/Applications/QGIS3.app/Contents/MacOS/../Resources/python/plugins
/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
/Users/indyatblake/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/indyatblake/Desktop/QGIS/Workshop
/Users/indyatblake/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/vrtbuilderplugin
/Users/indyatblake/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/vrtbuilderplugin/vrtbuilder
  • Hi Kadir I ran that, but still not sure what i'm doing wrong. I don't really know a great deal about coding. – Indy Sep 22 '18 at 0:31
0

Try installing the most recent GDAL framework from https://www.kyngchaos.com/software/frameworks/. Then restart QGIS.

I had the same problem and this solved it.

0

I had a bunch of issues getting osgeo running as well... conda install finally did the trick for me (running Windows, but my issues were similar).

This guy wrote a pretty helpful guide, in case you haven't already seen it: https://hackernoon.com/install-python-gdal-using-conda-on-mac-8f320ca36d90

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.