3

I am trying to install QGIS 3.4 on my Mac. When I open QGIS I get a message that osgeo is missing.

Couldn't load plugin 'processing'

ModuleNotFoundError: No module named 'osgeo'

Here are the steps I've gone through:

  1. I installed Python 3.6.8, per QGIS's instructions

This distribution requires Python 3.6 (only python.org Python 3 is supported, another python 3 installation can't be substituted, ONLY the MOST RECENT 3.6, not a later 3.7+). Python must be installed before installing QGIS.

  1. I installed the packages named in the QGIS readme using python3 -m pip install packagename

Some Python modules are required and installed using pip from files in the installer. Modules will be upgraded if already installed. Installed modules include (plus any dependencies):

owslib, PyYaml, psycopg2, jinja2, pygments, numpy, plotly

  1. I then installed QGIS without hiccup
  2. When I opened QGIS I was warned of an error (full log at end of question)
  3. Looking online I found that osgeo is a part of the GDAL package and that this is a common problem for installing QGIS 3.0. However, for QGIS 3.0 the install includes a step for installing GDAL before QGIS but this step and dmg is lacking in version 3.4.
  4. Still, I downloaded GDAL and ran the dmg file. GDAL (and subsidiarily osgeo) is now in my Library/Frameworks folder.
  5. Still, though when I run QGIS I receive the same error.
  6. Not knowing how Python works (I've used a previous version of QGIS and never needed Python – why do I need it now?) I went to Terminal again and ran python3 -m pip install gdal but this resulted in error:

... No such file or directory: 'gdal-config': 'gdal-config'


Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/f1/_nnmjmr53_s39dc46sfkj10w0000gn/T/pip-install-suyzpo9n/gdal/

I presume that I need to activate osgeo or gdal somehow but I don't know how. I'm surprised by how difficult this install is, especially for a program that doesn't require command line work once inside, and which previously had a much easier install.

QUESTION:

  • My ultimate question is how do I install QGIS 3.4 on macOS
  • I believe though the answer is that I need to install gdal, so my question becomes how do I install in gdal in a way that QGIS recognizes.

Many questions already exist about similar problems when installing QGIS but almost all of these are for QGIS 3.0, in which GDAL is a part of the installation process. I am asking for QGIS 3.4. with related scenarios but different problems / different versions

3

1 Answer 1

5

I had the same problem and solved it by:

  • removing both /Library/Frameworks/GDAL.framework and
    /Library/Frameworks/GEOS.framework

  • downloading the old QGIS 3.0 installer from here and installing only GDAL_complete, not QGIS itself.

  • after that, downloading the latest unified installer (3.4.3-2 as of writing, same page above) and runing the setup again.

Rather crude approach but I was fed up fiddling with those libraries.

2
  • Thanks @johwag, I'm on my phone now but will try this!
    – Unrelated
    Jan 18, 2019 at 6:49
  • Yup worked for me.
    – mdgis
    Apr 17, 2019 at 0:04

Your Answer

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

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