21

I would like to sell a Python application that uses PyQt4. The commercial licenses for Qt PyQt cost thousands of Euros together. Do I need to buy a commercial license?

Consider this from a "packaged" point of view where I'm providing an Ubuntu package through the Software Center. My package would "depend" on existing Ubuntu Python and PyQt packages so would I need to license something that Ubuntu is redistributing, that I am not directly?

Conversely, if I did include a GPL/LGPL Python library in my package would my package be able to remain non-free? Couldn't I just make the source to the GPL libraries available (if modified)?


If the answer is "You need a commercial license", are there any cheaper alternatives you know of (like royalty-based payments instead of up-front developer fees)?

2
  • 5
    I have edited this to explicitly talk about Ubuntu so that we can put all this hand-wringing behind us and actually answer people's questions. I have purged the debate from the comments and have reopened the question.
    – Oli
    Sep 2, 2013 at 21:57
  • Note that this question is about PyQt4 which is available under both GNU GPLs. The more recent PyQt5 is GNU GPLv3 only. The very apt technical differentiation about code "linking" does apply less there (= less suited for commercial packaging).
    – mario
    Jun 11, 2014 at 13:27

2 Answers 2

21

I am not a lawyer and this is not legal advice. This post is about what options you have, so it's a research tool, intended to be used alongside other research tools. Even in combination with other research tools, this is no substitute for consulting an attorney about any legal matter where you need a proper answer.

One of the license options for Qt (not PyQt) is the LGPL 2.1, which allows you to distribute proprietary programs that use the Qt library provided that you abide by all the terms of the LGPL 2.1.

PyQt, however, currently only has two licensing options (unless you negotiate something else with its developers, which would not ordinarily be practical). It is available under the GPL--then to distribute your program it would have to be free open source software; more specifically, any version of your program that you offer to others and that uses the PyQt library would have to be licensed under the GPL as well.

The only alternative to the GPL, for a program that uses PyQt, is to pay for a commercial license. As you indicated, this is often prohibitively expensive (though for some applications it's a good deal).

If your goal is to write a GPL-incompatible program in Python that uses Qt, you may want to consider PySide. Like PyQt, PySide is a Python binding for Qt, that lets you write Python programs that use Qt. Unlike PyQt, PySide is available under the LGPL (like Qt itself), and thus can be used by proprietary programs provided that you carefully read and abide by the terms of the LGPL.

Sometimes, PyQt has significant advantages over PySide. Often, it does not. There is also an element of subjectivity regarding which you may prefer to use; different programmers have different preferences. For more information, see Differences Between PySide and PyQt.

5
  • PyQt4 applications do not have to be GPL licensed. PyQt4 contains a GPL Exception that specifically allows certain non-GPL licenses. See: riverbankcomputing.com/software/pyqt/license and github.com/Werkov/PyQt4/blob/master/GPL_EXCEPTION.TXT
    – Mario
    Mar 16, 2014 at 17:28
  • 1
    @Mario Thanks for the info! But I'd encourage you to post an answer explaining this at little more, and also clarifying how it applies to the OP of this question (who appears to want to distribute proprietary PyQt-based software). Here's why: riverbankcomputing.com/software/pyqt/license shows PyQt may be licensed under GPL (two versions are allowed) or a commercial license (two variants) where a developer pays Riverbank for the right to distribute proprietary PyQt-based software. Mar 16, 2014 at 18:13
  • @Mario The key correction to my answer seems to be at github.com/Werkov/PyQt4/blob/master/GPL_EXCEPTION.TXT, which gives more options. But none seem to allow making PyQt-based software proprietary--they're other FOSS licenses. Also, is there an official page with a link to that file, or other information to clarify that it really is an official licensing document? (I believe it most likely is, but I'm not sure how I'd demonstrate that to a CEO or other stakeholder.) It's odd that the expanded options there aren't mentioned on the first licensing page on the official Riverbank site. Mar 16, 2014 at 18:14
  • Can I make the installer of an application that uses PyQt5 licensed under GPL, yet have the application that is being installed licensed under my own terms?
    – Niklas R
    Dec 6, 2016 at 14:35
  • 1
    Hi @EliahKagan! What about PySide2, does the same apply? Apr 17, 2019 at 8:32
6

Simply put: If you don't understand the terms of the licenses of the software you're using enough to interpret if what you're suggesting "is okay", you need to talk to a professional who does. If you want to seek a deal directly with the license owners, that works too but you'll still need to understand how licensing works.


Like Eliah, I'm also not a lawyer and when you're sued for following my advice, you can't say I didn't warn you. I generally agree with Eliah but I think in this case, Python is a bit different.

GPL software allows you to redistribute something as long as you provide it under the same license. In this case you would be redistributing PyQT which you can do. You'd also be distributing your product. I personally don't see why you can't do both as long as you make the source available for the GPL things you're using. You aren't integrating them into your Python, you're just using them.

To further describe what I'm talking about, if you included a library in a C project and compiled it down, you'd end up either the GPL code in your binary or you'd be creating static libraries that your code linked to (statically or dynamically). The FSF will demand you make your code available by GPL if you redistribute their protected code.

See the difference? Python's text-based distribution means the linking is pretty dynamic: There aren't static "links" to GPL code and the reference to PyQT could be substituted in a different environment. You are just using its API.

If you search for "python import gpl" you will find many, many arguments in both directions from many, many non-lawyers. This isn't a simple argument and if it did come to a lawsuit, you can be damned sure everybody on the free software side of the bench would be throwing everything at it to make sure a negative precedent was set.

So once again, you're probably not qualified to make this decision alone. Either talk to a lawyer or look at how much that would cost you and work out that it'll be cheaper just to pay for the commercial licenses.

Ignoring licensing will work out much more expensive.

1
  • 2
    «You aren't integrating them into your Python, you're just using them» If you import GPLed Python modules, the whole thing becomes GPL. Jan 24, 2016 at 20:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .