Closed echu87 closed 4 years ago
Nothing happening when you click the shortcut usually means there's an error as it starts. This will be written to a log file: https://pynsist.readthedocs.io/en/latest/installers.html#uncaught-exceptions
When I run the test launch I run into the following error:
Traceback (most recent call last):
File "pynsist_test.launch.pyw", line 34, in <module>
from main import run
File "pkgs\main.py", line 1, in <module>
import tkinter as tk
File "pkgs\tkinter\__init__.py", line 36, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: DLL load failed: The specified module could not be found.
This is strange because the install directory contains the lib and pkgs folder (pics in the previous comment) that seems correct from the explanation in the documentation.
That error message means that some DLL needed by Tkinter isn't there. Unfortunately, the error fails to say what DLL. Sometimes it's possible to work it out with a program called dependency walker.
Unfortunately tkinter is kind of a weird corner case for Pynsist. Because it's normally part of the standard library, it's not packaged on PyPI. But it's not included in the 'embeddable' Python build that Pynsist bundles with your application. So we don't have any good way to get it. The information in the FAQ is what someone else had to do to make it work, but maybe there's some detail missing or something that is different for different Python versions.
I've added an FAQ entry about that kind of error, as well as the existing entry about Tkinter.
https://pynsist.readthedocs.io/en/latest/faq.html#dll-load-failed-errors
I have been trying to create an installer for a simple Tkinter test application and have had trouble running the shortcut that it creates.
Config file:
folder structure:
folder created after the installation:
This folder looks correct according to https://pynsist.readthedocs.io/en/latest/faq.html#packaging-with-tkinter, and I have made sure that my bitness and python version is correct.
When I run the shortcut, nothing happens. If anyone has run into a similar problem your help would be greatly appreciated.