1

I'm using the semi-automatic classification (SCP) plugin in QGIS on a Mac OS Catalina 10.15.5. I've tried it in multiple versions and I'm having issues with saving files. Whenever I click the Run button on a Mac, it automatically creates temp files rather than letting me save the outputs somewhere.

For instance, when trying to clip multiple rasters using a PC, I click the Run button and a window pops up allowing me to browse to a folder to save the files. On a Mac, a window opens allowing me to only click Open rather than save and the output is a temp file with no discernible file name to help me figure out which of the multiple clipped files it is referencing and doesn't retain the default 'clip' prefix.

Any ideas? I can't find anything online that references how to fix this.

2 Answers 2

3

I finally figured this out and it actually resolved most of the QGIS Mac issues. Turns out Macs privacy protections got ramped up last year at some point and really locked down installs so complete QGIS installs weren't happening. Python and GDAL dependencies are being treated as malicious software and so they need permissions to download and install on the computers. As is, these aren't being installed with the QGIS Mac OS installers on the QGIS website. You need to do this manually.

  1. Go to the Python website to download the latest stable version: https://www.python.org/downloads/mac-osx/

You need this to complete the gdal install. I downloaded 3.8 by choosing the Download macOS 64-bit installer link.

  1. Then download the complete GDAL installer from here: https://www.kyngchaos.com/software/archive/gdal-complete/

I used "GDAL 3.1 Complete" but there is 3.2 in the meantime.

***If you get a malicious software won't install warning for any of these, go to the Apple menu > System Preferences > Security & Privacy > General Tab > Allow Anyway.

To view file paths in Mac, open up a Finder window, click the View menu > Show Paths.

To check things are installed properly, Python can be found under Library/Frameworks/Python.framework.

Gdal can be found under Library > Application Support > GDAL.

  1. Within QGIS, open up the Settings (you can get to this by selecting the wrench icon in the Processing Toolbox.

Go to Settings > Options > System > Environment Enable Use Custom Variables (check mark in the box)

First select Prepend, under variable enter PATH, under value enter (***Make sure you update the pathname with the version you downloaded. In this example, this was python 3.8 but yours may be different depending on when you download this.)

/Library/Frameworks/GDAL.framework/Programs:

/Library/Frameworks/Python.framework/Versions/3.8/bin:

1
  • I'm trying to install SCP for the first time. Just installed QGIS 3.22.4 from the all-in-one signed installer, running macOS Monterey 12.2.1. I see matplotlib in my Python 3.9 site packages, but receive an error in QGIS: 'Check Python Matplotlib installation for SCP'. I tried prepending the GDAL and Python 3.9 framework paths and restarting, but still getting the error. Any help is greatly appreciated.
    – Ian Yau
    Commented Mar 2, 2022 at 18:14
0

Rachel answer was brilliant and solved a number of additional issues. For those using the Semi-Automated Classification plugin, I was having issues preprocessing Landsat8 and Sentinel2 imagery (band processing worked but no output raster was created). After downloading Python 3.8 and GDAL 3.1, then updating the QGIS PATH settings all is working flawlessly.

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