So you have your development environment carefully set up, with pyenv
or conda
to manage multiple versions of Python and multiple virtual environments for different projects, and just the right version of GDAL installed, and you can even import gdal
without everything blowing up.
You want QGIS, but you don't want to ruin this careful tower of babel and be left unable to build anything with GDAL dependencies or run the right Python versions.
Turns out, using the packaged installers for QGIS will work just fine—because they install everything as macOS frameworks, which won't interact with the rest of your environment.
Steps:
- Download the macOS Python 3.6 installer from python.org.
Yes. This is actually necessary even if python --version
is already 3.6, and it won't mess anything up.
Their package installs Python as a framework—nothing ends up in /usr/bin
—as long as you follow the next step:
- Run the installer. On the "Installation Type" page, click Customize. Uncheck every box except "Install or upgrade pip".
Then click Install. What will happnen: you'll just end up with Python.framework in /Library/Frameworks
. The python3.6
and pip3
binaries will be in /Library/Frameworks/Python.framework/Versions/3.6/bin
, but since you unchecked "UNIX command-line tools", they aren't symlinked anywhere. Horray—totally isolated.
-
Download the QGIS macOS installer disk image and open it.
-
Just run the installers in order. First "2 Install GDAL Complete.pkg", then "3 Install QGIS 3.pkg".
The GDAL installer will just install macOS frameworks in /Library/Frameworks
. There should be no interaction with your existing installations.
- Open
/Applications/QGIS3.app
and watch it actually work!