I am trying to create a single-file executable for Windows from a Python application using pyinstaller .
I downloaded the experimental Python 3 pyinstaller from here (scroll down and you will find the download link, py3.zip file). And I installed it using python setup.py install . UPDATE: I also tried it with the Python 2 version and ran into the same problem.
Then I created a test python script called test.py with the following contents:
print('Hello, World!')
Then I ran the following command to create a single-file executable:
pyinstaller --onefile test.py
The command completed successfully, and I confirmed that the dist/test.exe file was created. However, when I try to start it, all I get is an empty console window. Nothing appears and the program never ends. It just hangs there forever until I close it.

Calling pyinstaller test.py (without the --onefile option) works fine. So what is the problem?
Please note that using py2exe or cx_freeze not an option. It must be a pyinstaller .
UPDATE: I just tested it under Python 2 (using the regular version of PyInstaller), and I ran into the same problem. So this is not just a Python 3 issue.
source share