# Can qgis_core work with external python distribution (such as Anaconda)?

I've built a python application that has its own GUI. I am trying to use qgis.core/PyQGIS as map display only. Specifically, I have anaconda 2.3 and its python distribution (2.7.11).

After research on postings on this thread, it seems that this scheme can only work if the application I am building (or anyone else' application) would need to "live inside QGIS world", i.e. move all dependencies to QGIS' python distribution. Could somebody (preferably from QGIS team) to give a definitive answer to this.

• You could just add the qgis site packages into your code with sys. sys.path.append("path\to\site-lib") – geodranic Jun 11 '18 at 18:02
• This is just an idea, since I have been struggling with this problem myself, but suppose you compile your program into an executable using pyinstaller, doesn't that eliminate the problem of python dependency? Whether you are using some stuff from anaconda and some stuff from qgis, pyinstaller digs through everything and handles the modules itself ,,, the application you package doesn't really care what environment you initially developed everything in... – user32882 Nov 27 '18 at 20:18

You can add QGIS's python distribution to your project in Pycharm. Here are detailed steps on this url.

https://github.com/apulverizer/pyspatialopt/wiki/Using-PyQGIS-with-PyCharm

This way, you can add qgis's python distribution and then use them in your native application, maybe just map part.