0

I am trying to create a very simple desktop application with one python module in pynsist. Pynsist appears to be functioning correctly, and the application installs correctly. When I try to launch the application from the start menu, it appears to open briefly, but does not execute the script. To test if it was something wrong with my code, or config file, I created a very dumbed down version and am having the same issue. My config file is as follows:

    [Application]
    name=Please work
    version=1.0
    entry_point=Test:main
    publisher:Company ABC

    [Python]
    version=3.6.4
    bitness=32

    [Include]
    packages=Test
        tkinter
        _tkinter

My module "Test.py" is saved in the same folder as the config file and is as follows:

from tkinter import messagebox

def main():
    messagebox.showinfo("New Box","Why don't I work?")

main()

This seems like it should be an easy fix, but am I missing something? In going through the message boards, some people appeared to have issues with tkinter; however, I was not getting any errors when pynsist created the application (as other people were getting)

Help is greatly appreciated.

EDIT: upon further investigation, it appears that tkinter though included in the application is not accessible to the installed python version that pynsist includes.

Diedrich
  • 184
  • 3
  • 8
  • Unfortunately using tkinter from Pynsist is a bit fiddly, because the version of Python it bundles with your applications doesn't include Tkinter. There's a PR adding some information about how to do it - I'll clean that up and merge it now. https://github.com/takluyver/pynsist/pull/146 – Thomas K Apr 05 '18 at 10:31
  • Here it is in the docs now that I've merged it: http://pynsist.readthedocs.io/en/latest/faq.html#packaging-with-tkinter – Thomas K Apr 05 '18 at 11:22
  • OK, I was able to install tkinter correctly and am able to run it from the python installed as part of the build. When I run the Test.launch file file in the build\nsis file, everything runs correctly (progress!). However, when I install the software and run, the script is still not executing. Any suggestions? – Diedrich Apr 05 '18 at 16:00
  • If there's an error when you run the installed software, it should be written to a log file, to help you figure out what's going wrong: http://pynsist.readthedocs.io/en/latest/installers.html#uncaught-exceptions – Thomas K Apr 06 '18 at 06:19

0 Answers0