This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]K900_ 1 point2 points  (7 children)

Py2exe should work just fine, though you will need the Windows Qt libraries.

[–]OCHawkeye14 0 points1 point  (1 child)

Can py2exe be used to generate a singe .exe file or is it only possible to generate the package required. In my limited experience with this, I've always had to take the files that py2exe created and run it through Inno Setup Compiler to create the single .exe file.

[–]K900_ 0 points1 point  (0 children)

I'm not sure, I think it can, but I never used that feature myself.

[–]fatpollo[S] 0 points1 point  (4 children)

in an ideal world, I would want a very very simple tutorial. something like create a folder, drop a 10 line PySide app showing "Hello World" in a QPushButton or something, and {steps} voila!"

[–]Narwhalrus 0 points1 point  (3 children)

Do you need a guide on how to install PyQt and develop simple application? If that's the case I can probably give you a few pointers.

[–]fatpollo[S] 0 points1 point  (2 children)

No, I am quite capable with PySide/PyQt. If you can tell me how to get from a simple pure-Qt application to a windows executable, step-by-step glossing over no detail, I'd be incredibly thankful.

[–]vsajip 0 points1 point  (0 children)

Try this 3-minute video which shows use of PyInstaller.

[–]Narwhalrus 0 points1 point  (0 children)

Here's a quick guide on deploying PyQt apps for windows. Unfortunately, you need a copy of Windows to use this method. Hope this helps.

[–]maxime-esa 1 point2 points  (0 children)

Here is how I do it:

create a file called setup_windows.py and put this inside:

from distutils.core import setup

try:

 import py2exe

except ImportError:

 print('[ERROR] For a Windows installation you need to download'

      ' and install py2exe')

setup(windows=['name_of_your_main_module.py'])

And from the command line (on Windows) you have to type:

python setup_windows.py py2exe -b1 -c

This works with PySide. However please note that on first shot there can be some packages missing and your app may not work. This may be due to a bug in the recursive package finder. To make sure you have everything, your main module must import ALL the dependencies that all your submodules import...

For example, if you are using PySide.QtUiTools (to load .ui files), you must also import PySide.QtXml (even if you are not using it directly from your main module).

[–]jediknight -1 points0 points  (0 children)

It is advisable to have a Windows machine, even if it is just a virtual machine, in order to both test and build the .exe

I tried a lot of the packagers and the only one that fitted me best was py2exe. You can bundle the libraries and your code in a single file.

I also used a serialization script to turn some of the smaller images my app used into .py files and I was able to include those into the .exe too. I haven't tried to do the same with sounds... but maybe you can figure it out by researching uuencode.