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

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/frameworks/

At this time, it is "GDAL 3.1 Complete"

***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:

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.

0

Ok, so another update since the original answer post. I have tested this on Mac OS High Sierra and Big Sur. I have also tested this with QGIS versions 3.16 and 3.18. Steps I have used to get the SCP plugin to work on QGIS:

  1. Uninstall QGIS

  2. Follow the steps above and download and install python (I have tested this with both versions 3.8 and 3.9)

  3. Follow the steps above and download and install gdal (I have tested this with both versions 3.1 and 3.2)

  4. Install QGIS from https://www.qgis.org/en/site/forusers/download.html (I tried the versions on the Kyngchaos website but they are not currently working. He is aware and working on a fix)

  5. In QGIS, go to Processing Settings > Options > System > Environment Enable Use Custom Variables (check mark in the box) and click the plus icon.

The path has been slightly updated from the previous solution.

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.9 but yours may be different depending on when you download this.)

/Library/Frameworks/Python.framework/Versions/3.9/bin:/Library/Frameworks/GDAL.framework/Versions/3.2/Programs:

  1. Shut down QGIS and restart

  2. If you have the SCP Version 7 installed, uninstall it. You can install them concurrently but it frequently crashed things for me so it was easier to just uninstall.

  3. Install SCP Version 6 instead. The instructions to do this can be found here: https://fromgistors.blogspot.com/2020/10/SCP7.html

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