I'd like to install QGIS. I'm on a system that defaults to Python 2.5x and I downloaded python 3.7x with homebrew. I created a virtual environment with this code.

brew install pyenv
brew install pyenv-virtualenv
exec $SHELL
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
pyenv activate my-virtualenv

I install python 3.6 and the modules plotly, numpy, pygments, psycopg2, owslib, and PyYaml.

Each of them are confined to the virtual environment. How do I install the package so that it loads and uses the Python from only the partcular environment.

1 Answer 1


Go Docker!

I would suggest to use a containerized solution.

You can for example run a full-fledge, stand-alone QGIS in a Docker container; it is very simple!

Start here and customize the environment editing the file Dockerfile.

At the time of writing, QGIS 3.4.x (LTS) and QGIS 3.8.x (latest) are supported.



QGIS on Docker

Disclaimer: I maintain both the repositories above :D

  • 2
    Worked like a charm, thanks! Note to users: the data files all have to be under ~/qgis34-files. Drag-drop from elsewhere won't work.
    – Nikhil VJ
    Jul 10, 2019 at 10:11
  • Please note that as of today, also version 3.8 (aka "latest") is available, both on GitHub and as an automated image on DockerHub ;) Jul 10, 2019 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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