1

I am developing a QGIS plugin in QGIS 2.18.15 on macOS 10.13.2 and I am having some troubles with Python libraries dependencies. More specifically, my plugin will require to use an external Python library which is already installed and working in my system (both for Python 2.7 and Python 3). The problem is that apparently QGIS uses its own different version of Python (Python 2.7.10) which is not equipped with the library I need.

How can I ask QGIS to use the default system version of Python?

As an alternative, how can I add external libraries to the QGIS Python 2.7.10?

  • QGIS from KyngChaos use exclusively the Apple Python preinstalled (2.7.10) with modules in /Library/Python/2.7/site-packages (there are many answers to this question on GiS SE) – gene Jan 22 '18 at 16:38
  • Is there any way to force QGIS to use another version of Python? Or, as an alternative, is there any way to add packages/libraries to Apple Python preinstalled (2.7.10) ? – user3352382 Jan 22 '18 at 16:46
  • With the KyngChaos version no. To install libraries to Apple Python, it's like the other versions. (with pip, easy_install or setup.py) – gene Jan 22 '18 at 17:00
  • My problem is that pip installs libraries to a different version of Python, and not to Apple Python (pip 9.0.1 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (python 2.7) ) – user3352382 Jan 22 '18 at 17:26
  • 1
    Unfortunately, this is not the case with the KyngChaos QGIS – gene Jan 22 '18 at 19:29

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.