5

I need help with this problem QGis 3.0 to MacOS HighSierra. When I start QGis 3.0 its show this message.

first message...

ModuleNotFoundError: No module named 'osgeo' 
Traceback (most recent call last):
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 311, in loadPlugin
    __import__(packageName)
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/plugins/processing/__init__.py", line 28, in 
    from processing.tools.dataobjects import *          # NOQA
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/plugins/processing/tools/dataobjects.py", line 51, in 
    from processing.algs.gdal.GdalUtils import GdalUtils
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/plugins/processing/algs/gdal/GdalUtils.py", line 35, in 
    from osgeo import gdal
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'osgeo'


    Versión de Python: 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] 
    Versión de QGIS: 3.0.0-Girona Girona, exported 
    
Ruta de Python:
* /Applications/QGIS3.app/Contents/MacOS/../Resources/python
* /Users/enver/Library/Application Support/QGIS/QGIS3/profiles/default/python
* /Users/enver/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/enver/Library/Application Support/QGIS/QGIS3/profiles/default/python

The second message is...

ModuleNotFoundError: No module named 'owslib' 
Traceback (most recent call last):
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 336, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/plugins/MetaSearch/__init__.py", line 29, in classFactory
    from MetaSearch.plugin import MetaSearchPlugin
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/plugins/MetaSearch/plugin.py", line 34, in 
    from MetaSearch.dialogs.maindialog import MetaSearchDialog
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/plugins/MetaSearch/dialogs/maindialog.py", line 46, in 
    from owslib.csw import CatalogueServiceWeb # spellok
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'owslib'

    Versión de Python: 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] 
    Versión de QGIS: 3.0.0-Girona Girona, exported 
    
Ruta de Python:
* /Applications/QGIS3.app/Contents/MacOS/../Resources/python
* /Users/enver/Library/Application Support/QGIS/QGIS3/profiles/default/python
* /Users/enver/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/enver/Library/Application Support/QGIS/QGIS3/profiles/default/python
0

5 Answers 5

3

I assume this is the KyngChaos build, rather than one from homebrew.

The problem is that QGIS is only partially installed. GDAL and GEOS need to be installed too.

  • I suspect you installed the latest KyngChaos build, as it's showing up as /Applications/qgis3.app (no space before the 3)
  • you have the correct python installed (the official python packages from python.org, not one from brew).

Your python path should include something like this:-

/Library/Frameworks/GEOS.framework/Versions/3B/Python/3.6/site-packages
/Library/Frameworks/GDAL.framework/Versions/2.2/Python/3.6/site-packages

If you open up the .dmg package you should see a set of contents.

enter image description here

Read the readme file and make sure you install GDAL first, then QGIS (using the "1. Install GDAL complete" in the .dmg file).

I find that the KyngChaos QGIS 3.0 works happily alongside QGIS 2.18, as it keeps the files in two separate applications.

Be aware - this is an "early adopter" version, so some things may not work yet.

0
1

Same issue here. I suspect it is because QGIS cannot get the correct path. After several minutes of searching, I tried to figure out a solution (at least for me):

DO NOT use the 1 install GDAL Complete.pkg to install GDAL. Try use pip to get GDAL from PyPi instead. My QGIS returned to normal after performing this.

pip3 install GDAL
1

I don't know why but I had the same issue the first time I installed QGIS, even in the right order. I installed QGIS, I reinstalled and all works well now.

I use Mojave

0

I had the same issue and resolved it by downloading the DMG and starting the install from scratch in the prescribed install order.

-1

Had the same issue on macOS Mojave 10.14.3. I uninstalled the python versions I had (installed with brew, so brew uninstall python2 and brew uninstalled python3) Then installed python 3.6 from python.org (https://www.python.org/ftp/python/3.6.8/python-3.6.8-macosx10.9.pkg). Used this version because I had an error from QGIS 3.6 that it needed python 3.6.

Finally did pip3 install GDAL.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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