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 Mar 23 '18 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 Mar 23 '18 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 Mar 23 '18 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. – jdbcode Mar 23 '18 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 Mar 25 '18 at 7:32

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). – R'n'E Apr 16 '18 at 13:02
  • This solution worked perfectly on QGIS 3.4.10-Madeira, under iOS Sierra 10.12.6 – Camilo Sep 24 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 Nov 4 at 5:21

protected by Community May 21 '18 at 15:59

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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