Search code examples
pythonwindowexepython-3.6

Script doesn't produce any output after being converted to Win executable


I have a python (3.6) script prints the output using print() command:

print(convert_size(logsize))

Then I converted the script to .exe using cx_Freeze 5.0.1. When it does work from IDLE and prints the output, launching .exe file with double-click, or as Administrator, or executing it from cmd as Administrator doesn't produce any output at all: http://prnt.sc/emz5m4

I have tried to add input() at the end of the script and then re-compile the file to .exe, which supposed to "stop" window from closing but it still closes.


Solution

  • It appears the pyinstaller has been launched from 3.6 location since I had it installed for 2.7 and 3.6. Once the correct location (C:\Python27\Scripts) has been pointed to, the script has been compiled successfully!