23

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).

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 give a definitive answer to this?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
For Comment
  • 1,115
  • 7
  • 21

2 Answers2

2

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.

This answer/example is implementable with PyCharm project only, please elaborate more about your python environemnt.

Ahsan Mukhtar
  • 2,281
  • 9
  • 31
0

QGIS 2.x was published with its own version of python(2.7). Any sort of connection from other python distributions is possible but is not recommended.

The easiest way for you is using QGIS's own python. Then simply install your demanded dependencies on it and you will be ready to go.

In the case of using R syntax in your code, just read this.

Jochen Schwarze
  • 14,605
  • 7
  • 49
  • 117
Ash
  • 1,210
  • 7
  • 22