I installed QGIS 3, and tried to execute tools like "sieve" "merge" and "polygonize". All of them gave me the error message:

GDAL command output: /bin/sh: (scriptname).py: command not found

I found the scripts in both /Username/miniconda3/bin and /Username/miniconda3/lib/python3.6/site-packages/GDAL-2.2.2-py3.6-macosx-10.9-x86_64.egg-info/scripts.

Checking env in Terminal shows that miniconda3/bin is in the path:


What could be causing the failure of executing those scripts?

  • 1
    Please edit your question and specify how you installed QGIS 3. Note you can't use anaconda python with the KyngChaos QGIS3 package - osgeo-org.1560.x6.nabble.com/…
    – user2856
    Commented Mar 23, 2018 at 4:48
  • I did install the conda python 3.6, and then installed GDAL and QGIS3 using the KyngChaos packages downloaded from qgis.org/en/site/forusers/download.html.
    – Iris
    Commented Mar 23, 2018 at 15:02
  • If I can't use conda python with QGIS3, should I install the python.org python and then re-install QGIS3? What should I do with the conda python?
    – Iris
    Commented Mar 23, 2018 at 15:04
  • I think that QGIS uses it's own isolated python/gdal environment and does not look to any other installations. So it seems like it is a problem within QGIS 3. I have seen some other problems with QGIS 3. It was just released and the release note (blog.qgis.org/2018/02/23/qgis-3-0-girona-is-released) says that "we do not expect it to be as reliable as the 2.18 LTR just yet". I'd uninstall 3 and go back to 2.18. Commented Mar 23, 2018 at 15:40
  • @jdbcode QGIS doesn't use "it's own isolated python/gdal environment and does not look to any other installations.". Nor is it a problem with QGIS 3.0 per se. It's a problem of binary compatibility. QGIS 3.0 was built against python.org Python 3.6 and requires that to be installed separately. Not anaconda, homebrew or macports python. Many other software packages have the same issue. In Windows land there's a thing called "DLL Hell".
    – user2856
    Commented Mar 25, 2018 at 7:32

1 Answer 1


This is a known issue as documented on KyngChaos https://www.kyngchaos.com/blog/2018/20180322_qgis_3.0.0-3

A workaround is available as follows

Go to Settings ... Options... System ... Environment Enable "Use Custom Variables "

First select "Prepend", under variable enter "PATH", under value enter


(all these without the quotes)

Restart QGIS and it should work.

  • 1
    As of 3.0.1, this is included in the Read Me.rtf. Seems to work (so far).
    – aae
    Commented Apr 16, 2018 at 13:02
  • This solution worked perfectly on QGIS 3.4.10-Madeira, under iOS Sierra 10.12.6
    – Camilo
    Commented Sep 24, 2019 at 15:38
  • This works as well William's QGIS3.8.3. Without this solution, William's 3.4 and 3.8 installations will not be working.
    – ns-1m
    Commented Nov 4, 2019 at 5:21
  • @spatialthoughts, thanks. I had the same issue and this fixed my issue with GDAL on my Mac 10.15.2 running QGIS 3.4 and 3.10. However, I'm having the same issue with other processing tools for Grass and Saga. Is there a similar custom variable required for each of these?
    – Colin
    Commented Dec 31, 2019 at 2:48
  • @Colin Here's the workaround for GRASS github.com/qgis/QGIS/issues/32511#issuecomment-552190397 , but this issue was fixed and the latest mac installers for 3.10 works out of the box for me. Commented Dec 31, 2019 at 5:58

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