I would like to develop an application using the QGIS libraries and PySide instead of PyQt4 due to more flexible licencing, I wonder if this is possible.

I downloaded PySide and replaced my references to PyQt4 in an existing program, and it throws this error immediately:

Traceback (most recent call last):
  File "E:\me\myapp\myapp.py", line 8, in <module>
    from qgis import core
  File "C:\OSGeo4W64\apps\qgis\python\qgis\__init__.py", line 36, in <module>
    from qgis.core import QgsFeature, QgsGeometry
  File "C:\OSGeo4W64\apps\qgis\python\qgis\core\__init__.py", line 1, in <module>
    from qgis._core import *
ImportError: DLL load failed: The specified procedure could not be found.

This error does not appear when I use PyQt4 instead of PySide.

I'd like to know if I'm flogging a dead horse with this - I don't have the time or knowledge to contribute any changes to QGIS source code to accommodate PySide (if that's what it requires).

I found the only other reference to this here but with no answers.

  • 3
    Flexible in what sense? QGIS is still GPL as is anything made with it.
    – Nathan W
    Commented Jul 5, 2014 at 10:36
  • Ok so I don't fully understand licensing; my company is looking to make an application based on PyQt4 and QGIS libraries which is included in a commercial service (not selling the application itself, but selling the service which includes the application). I want to avoid any complication where possible.
    – James N
    Commented Jul 5, 2014 at 12:47

1 Answer 1


You're "flogging a dead horse" here, with regards to PySide, unless you are willing to do (or fund) some serious QGIS development in this area. I highly doubt PySide can supplant PyQt4 when using the PyQGIS modules. I don't think the bindings are currently agnostic enough to be used by both. Also, just importing qgis.core requires the PyQt4 sip utility.

It is certainly possible to make the bindings work with PySide, but no one in the QGIS developer community is actively working on this, or even discussing it.

On the licensing side (and keeping in mind I am not providing any type of legal advice here), the compiled Python modules qgis.core, qgis.gui, etc. are linked to Qt, which can be licensed under LGPL.

However, QGIS and PyQt4 are NOT licensed as LGPL, only GPL. If you are charging for a service, and all the software you create leveraging PyQGIS/PyQt4 libraries (your app) is also GPL-licensed, open source and freely available, you may be OK. This might also be OK for satisfying the Qt use license. PySide's extra LGPL licensing won't gain you any advantages in this scenario.

To be sure, you should ask the licensing questions directly to Qt and PyQt4, and on the QGIS developer mailing list. Since I do not know your exact scenario, I am just guessing. Best to ask the projects directly.

Providing a commercial service based upon these libraries, and even redistributing them, is not unheard of, as is the case with Boundless and other similar entities in the geospatial domain. In fact, it is a sound business plan, if you can ensure the licensing concerns are correctly addressed.

  • Thanks for the info, we will be seeking legal advice, and I had already thought about the situation with companies developing for FOSS who are paid by clients.
    – James N
    Commented Jul 5, 2014 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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