I am using QGIS 3.10, and Mac OS 10.(14 & 15)

This issue relates to recent versions of QGIS for the Mac that are distributed as .dmg.

These versions of QGIS bundle their chosen version of Python inside the application so they have control of the version being used. One consequence of this is that the path that python uses to find modules (sys.path) is relative to the QGIS application directory. So when one installs a module on your machine with pip it is installed into the system python tree, not the tree rooted in the QGIS application.

I ran into this because I use scriptrunner to run some scripts that include gpxpy. I initially fixed this by adding the directory where gpxpy was install to sys.path in the script but this made my script machine dependent.

My first thought was to see if there was a version of pip in the QGIS python tree that I could use to install modules but if it is there I did not find it.

Scriptrunnner appears to be unsupported -- there are 3 open issues with no comments or actions over more than a year.

One thing that puzzles me is how do plugins that require other module work around this issue so there must be a known solution.

Can someone point me in the right direction?

Your Answer

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

Browse other questions tagged or ask your own question.