Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python GUI App Distribution: written in wxPython, TKinter or QT

My question is about the easiness of distributing the GUI app across the platforms (Mac/Linux/Windows), and I want to know the one that makes the user's job easiest.

My current understanding is that Tkinter app is the easiest for the users (to install) because as long as the user has installed a Python in her box, my application should be ready to run on that box.

For GUI app written in wxPython or pyQT, the user needs to install wxWidget or QT in her box first, which is an extra step, and then install my GUI app. (But my Ubuntu box seems to have the wxWidget libraries and QT libraries installed by default, is that a norm or just Ubuntu distro is more friendly to users? I guess Windows and Mac probably does not provide them by defualt, ie. the users need to download and install them as an extra step)

like image 692
chen Avatar asked Oct 01 '12 00:10

chen


People also ask

Which is better tkinter or wxPython?

wxPython has much better printing support than Tkinter. wxPython cons: wxPython requires a separate download which can be a pain to manage when you deploy your app. Documentation is very weak in my opinion; it's very hard to find specific information.

Which is better PyQt or wxPython?

WxPython has fewer convenience functions when compared to PyQt. For instance, copy and paste functionality is built right into PyQt, while it has to be coded by hand in wxPython (and is still partially subject to the platform it runs on).

Is Qt better than tkinter?

Anyhow, in most situations, the best solution is using PyQt, considering the advantages and disadvantages of both PyQt and Tkinter. GUI programming with Qt is created around signals and slots for communication amongst objects. Thus, it allows flexibility, while it gets to the programmer access to a wide array of tools.

Which is better KIVY or tkinter or PyQt?

In this article, we conclude that there is no much difference in Kivy or PyQt when speaking about working on GUI in Python, but they both are frameworks that work on different applications such Kivy is much better for mobile apps and other multi-touch apps than desktop apps, whereas PyQt is much better for desktop apps ...


3 Answers

If you're running Ubuntu, PyQt will be installed by default. Most linux distros will have one of PyGtk or PyQt installed by default. WxPython was most likely installed in your Ubuntu box as a dependency for some other package in your system.

If your target market is Linux, you can just create a deb or rpm package and that'll take care of the dependencies for your application.

For Windows and Mac(and even Linux if you're so inclined) you could bundle the python interpreter with your application and its libraries into a native executable format such as .exe, .dmg or .elf using libraries like cx_freeze, py2exe and py2app. Once this is done, your user will not have to install python or any of your libraries.

like image 58
prabu Avatar answered Nov 10 '22 01:11

prabu


Tkinter is the only one that's included with Python. wxPython and pyQT need both the wxWindows or QT libraries and the wxPython or pyQT libraries to be installed on the system.

However, Tk does not look very nice. If you're already making the user install Python, you could just as well have them install the libraries too. (Or maybe include an installer or something.)

like image 24
marinus Avatar answered Nov 10 '22 00:11

marinus


If the app is going to be cross-platform I would suggest WxWidgets (wxpython). I have used it several times and it has never been a problem.

Nevertheless, you should create different installers for Windows, Mac and Linux. In Linux, use .deb or .rpm to take care of dependencies.

In Windows, I've always used py2exe to create an exe file. Py2exe works by attaching the python interpreter and the needed libraries, in this case wxWidgets.

Check this link for more information: http://www.py2exe.org/

like image 24
santi Avatar answered Nov 10 '22 01:11

santi