Pynsist project can't find default Python after installation

642 views Asked by At

I have built a GUI using PyQt5 and wanted to distribute it to other computers without Python installed by packageing it with pynsist. Unfortunately, the default Python, which does exist in the 'Python'-folder of the installation (and which is executable), cannot be found.

I first thought that there must be a problem with the paths pynsist was generating for the shortcut, but it is targeting the right path to pythonw.exe (I am using Python without a terminal) and the .launch.pyw file, which correctly triggers the main() function of the script. E.g. C:\install_GUI\Python\pythonw.exe 'C:\install_GUI\GUI.launch.pyw'

When trying to start the script directly (not using the shortcut) I get the warning message 'Can't find a default Python'.

Any suggestions what causes this problem and how to make it work?

Could this issue be related to the coding of the scripts? This means I have included # -*- coding: utf-8 -*- on top of each script, but the automatically generated .launch.pyw file comes without this line. I know that Python above version 3 has utf-8 coding as a default, but without adding this line to the .launch.pyw file the GUI does not even work on my computer after installation (using Python 3.6.5).

Thank you in advance for your answers!

0

There are 0 answers