[PyQt] Porting PyQt GUI between platforms.

Juan Manuel Santos vicariousdm at gmail.com
Tue Aug 3 02:24:17 BST 2010

From: Algis Kabaila <akabaila at pcug.org.au>
To: pyqt at riverbankcomputing.com
Date: Monday 02 August 2010
> Hi,
> To help my 24 yr old grandson to plan his finances, I wrote a little Python
> script.  It appears that the CLI is not acceptable to a modern MS Window
> user. So I've added a simple PyQt GUI to it in my Linux platform (kubuntu
> 10.04).
> I now need to port it to MS Windows, probably to the Win XP version. Can
> you help me to get started?  What are the references for the process?
> I would greatly appreciate some guidance,
> OldAl.

I've never actually ported a PyQT program to Windows, but I did so with PyGTK 
programs, and the general steps should be the same:

1. Have Python installed on the Windows PC (which I believe you already have), 
together with any additional Python modules you may be using
2. Install PyQt for Windows (tentatively from here: 
http://www.riverbankcomputing.co.uk/software/pyqt/download ).

As I said, I have never actually done so, but if the PyQt installer bundles Qt 
as the webpage says it does, probably with those two you are all set. 
Otherwise you may need to append the Qt path to the environmental PATH 
variable, like GTK on Windows needs, but let's leave that for the end in case 
the former does not work :).

After installing those two you can try running the exact PyQt program you were 
developing on Linux, on your Windows box. Why don't you give it a try and post 
some results?

Additionally, if you have a Windows box to spare in which you can install all 
that was mentioned above, you can create an executable for the application 
with py2exe, thus removing any further dependencies on Python or Qt (if 
properly configured, py2exe outputs an executable which can be run in any 
Windows machine).

Good luck

Juan Manuel Santos

More information about the PyQt mailing list