0
votes

I developed an app using QT library. I compiled it to .exe using PyInstaller through its .spec file. If I run it from dist folder it works smoothly without any error. But, the problem appears when I package it as an installer using Inno Setup.

If I install it on my computer (even outside the 32/64-bit ProgramFiles folders) as new software, a popup window appears saying the following error:

dialog's window title: Fatal error detected dialog's window message: Failed to execute script pyi_rth__tkinter

Error from my program after installed on my computer

For your curiosity, the list of packages I have are:

C:\Users\User-PC\Desktop\PyQt5_Projects\PackagingTutorials\MyApp>pip list
Package                   Version   Location
------------------------- --------- ----------------------------
altgraph                  0.17
array-to-latex            0.82
atomicwrites              1.4.0
attrs                     20.3.0
auto-py-to-exe            2.9.0
blessings                 1.7
bottle                    0.12.19
bottle-websocket          0.2.9
certifi                   2020.6.20
cffi                      1.14.0
chardet                   3.0.4
clipboard                 0.0.4
colorama                  0.4.4
control                   0.8.4
cryptography              3.0
cycler                    0.10.0
docutils                  0.17.1
docx                      0.2.4
docxtpl                   0.10.2    c:\users\user-pc\src\docxtpl
Eel                       0.12.4
et-xmlfile                1.0.1
fpdf                      1.7.2
future                    0.18.2
gevent                    21.1.2
gevent-websocket          0.10.1
GPUtil                    1.4.0
greenlet                  1.1.0
helpdev                   0.7.1
idna                      2.10
iniconfig                 1.1.1
jdcal                     1.4.1
Jinja2                    2.11.2
Kivy                      2.0.0
kivy-deps.angle           0.3.0
kivy-deps.glew            0.3.0
kivy-deps.sdl2            0.3.1
Kivy-Garden               0.1.4
kiwisolver                1.3.1
lhsmdu                    1.1
lxml                      4.5.2
macholib                  1.14
MarkupSafe                1.1.1
matplotlib                3.2.2
mpmath                    1.1.0
ntplib                    0.3.4
numpy                     1.20.2
oauthlib                  3.1.0
openpyxl                  3.0.5
packaging                 20.9
pandas                    1.1.0
pdflatex                  0.1.3
pefile                    2021.5.13
Pillow                    8.2.0
pip                       21.1.2
pip-licenses              2.3.0
pluggy                    0.13.1
prettytable               2.1.0
psutil                    5.7.2
PTable                    0.9.2
py                        1.10.0
pycparser                 2.20
Pygments                  2.9.0
pyinstaller               5.0.dev0
pyinstaller-hooks-contrib 2021.1
pyparsing                 2.4.7
pyperclip                 1.8.0
pypiwin32                 223
PyQt5                     5.15.0
PyQt5-sip                 12.8.0
PyQt5Designer             5.14.1
PySide2                   5.15.2
pytest                    6.2.2
python-dateutil           2.8.1
python-docx               0.8.10
pytz                      2020.1
pywin32                   301
pywin32-ctypes            0.2.0
QDarkStyle                2.8.1
QtPy                      1.9.0
requests                  2.24.0
requests-oauthlib         1.3.0
scipy                     1.6.2
setuptools                57.0.0
shiboken2                 5.15.2
six                       1.15.0
sympy                     1.6.2
tabulate                  0.8.7
Tcl                       0.2
tex                       1.8
toml                      0.10.2
tornado                   6.1
urllib3                   1.25.10
wcwidth                   0.2.5
whichcraft                0.6.1
wxPython                  4.1.1
zope.event                4.5.0
zope.interface            5.4.0

and the PyInstaller's cmd info:

C:\Users\User-PC\Desktop\PyQt5_Projects\PackagingTutorials\MyApp>pyinstaller MainFile.spec
98 INFO: PyInstaller: 5.0.dev0
98 INFO: Python: 3.8.3
100 INFO: Platform: Windows-10-10.0.18362-SP0
102 INFO: UPX is not available.
135 INFO: Extending PYTHONPATH with paths
['C:\\Users\\User-PC\\Desktop\\PyQt5_Projects\\PackagingTutorials\\MyApp',
 'C:\\Users\\User-PC\\Desktop\\PyQt5_Projects\\PackagingTutorials\\MyApp']
169 INFO: checking Analysis
170 INFO: Building Analysis because Analysis-00.toc is non existent
171 INFO: Initializing module dependency graph...
174 INFO: Caching module graph hooks...
186 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.
208 INFO: Analyzing base_library.zip ...
3410 INFO: Processing pre-find module path hook distutils from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
3458 INFO: distutils: retargeting to non-venv dir 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib'
7500 INFO: Caching module dependency graph...
7790 INFO: running Analysis Analysis-00.toc
7811 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
  required by c:\users\user-pc\appdata\local\programs\python\python38-32\python.exe
7912 INFO: Analyzing MainFile.py
10504 INFO: Processing pre-find module path hook site from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-site.py'.
10512 INFO: site: retargeting to fake-dir 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\fake-modules'
27080 INFO: Processing pre-safe import module hook six.moves from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-six.moves.py'.
55158 INFO: Processing module hooks...
55159 INFO: Loading module hook 'hook-cryptography.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
55431 INFO: Loading module hook 'hook-docx.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
55499 INFO: Loading module hook 'hook-jinja2.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
55540 INFO: Loading module hook 'hook-lxml.etree.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
55542 INFO: Loading module hook 'hook-lxml.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
55927 INFO: Loading module hook 'hook-openpyxl.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
56056 INFO: Loading module hook 'hook-prettytable.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
56059 INFO: Loading module hook 'hook-pycparser.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
56060 INFO: Loading module hook 'hook-pytest.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
57813 INFO: Loading module hook 'hook-win32ctypes.core.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
58068 INFO: Loading module hook 'hook-difflib.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
58075 INFO: Loading module hook 'hook-distutils.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
58087 INFO: Loading module hook 'hook-distutils.util.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
58095 INFO: Loading module hook 'hook-encodings.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
58180 INFO: Loading module hook 'hook-heapq.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
58187 INFO: Loading module hook 'hook-lib2to3.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
58223 INFO: Loading module hook 'hook-matplotlib.backends.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
58896 INFO:   Matplotlib backend "GTK3Agg": ignored
    backend Gtk3Agg requires cairo
59257 INFO:   Matplotlib backend "GTK3Cairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
59639 INFO:   Matplotlib backend "MacOSX": ignored
    cannot import name '_macosx' from 'matplotlib.backends' (c:\users\user-pc\appdata\local\programs\python\python38-32\lib\site-packages\matplotlib\backends\__init__.py)
59999 INFO:   Matplotlib backend "nbAgg": ignored
    No module named 'IPython'
60479 INFO:   Matplotlib backend "Qt4Agg": added
60889 INFO:   Matplotlib backend "Qt4Cairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
61340 INFO:   Matplotlib backend "Qt5Agg": added
61702 INFO:   Matplotlib backend "Qt5Cairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
62225 INFO:   Matplotlib backend "TkAgg": added
62727 INFO:   Matplotlib backend "TkCairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
63370 INFO:   Matplotlib backend "WebAgg": added
64845 INFO:   Matplotlib backend "WX": added
65430 INFO:   Matplotlib backend "WXAgg": added
65836 INFO:   Matplotlib backend "WXCairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
66220 INFO:   Matplotlib backend "agg": added
66596 INFO:   Matplotlib backend "cairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
67145 INFO:   Matplotlib backend "pdf": added
67651 INFO:   Matplotlib backend "pgf": added
68029 INFO:   Matplotlib backend "ps": added
68422 INFO:   Matplotlib backend "svg": added
68906 INFO:   Matplotlib backend "template": added
69937 INFO: Loading module hook 'hook-matplotlib.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
70242 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
70250 INFO: Loading module hook 'hook-numpy.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
70350 INFO: Import to be excluded not found: 'f2py'
70357 INFO: Loading module hook 'hook-numpy._pytesttester.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
70365 INFO: Loading module hook 'hook-packaging.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
70366 INFO: Loading module hook 'hook-pandas.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
71303 INFO: Loading module hook 'hook-pickle.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
71310 INFO: Loading module hook 'hook-PIL.Image.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
71673 INFO: Loading module hook 'hook-PIL.ImageFilter.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
71681 INFO: Loading module hook 'hook-PIL.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
71695 INFO: Loading module hook 'hook-PIL.SpiderImagePlugin.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
71702 INFO: Loading module hook 'hook-pkg_resources.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
72596 INFO: Processing pre-safe import module hook win32com from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\pre_safe_import_module\\hook-win32com.py'.
72879 WARNING: Hidden import "pkg_resources.py2_warn" not found!
72880 WARNING: Hidden import "pkg_resources.markers" not found!
72887 INFO: Loading module hook 'hook-pygments.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
76256 INFO: Loading module hook 'hook-PyQt5.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
76461 INFO: Loading module hook 'hook-PyQt5.QtCore.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
76714 INFO: Loading module hook 'hook-PyQt5.QtGui.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
77046 INFO: Loading module hook 'hook-PyQt5.QtWidgets.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
77435 INFO: Loading module hook 'hook-PySide2.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
77845 INFO: Loading module hook 'hook-PySide2.QtCore.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
78073 INFO: Loading module hook 'hook-PySide2.QtGui.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
78375 INFO: Loading module hook 'hook-PySide2.QtNetwork.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
79136 INFO: Loading module hook 'hook-PySide2.QtPrintSupport.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
79896 INFO: Loading module hook 'hook-PySide2.QtWidgets.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
80325 INFO: Loading module hook 'hook-pytz.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
80529 INFO: Loading module hook 'hook-scipy.linalg.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
80530 INFO: Loading module hook 'hook-scipy.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
80540 INFO: Loading module hook 'hook-scipy.sparse.csgraph.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
80589 INFO: Loading module hook 'hook-scipy.spatial.transform.rotation.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
80727 INFO: Loading module hook 'hook-scipy.special._ellip_harm_2.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
80732 INFO: Loading module hook 'hook-scipy.special._ufuncs.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
80733 INFO: Loading module hook 'hook-scipy.stats._stats.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
80735 INFO: Loading module hook 'hook-setuptools.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
82082 INFO: Import to be excluded not found: 'setuptools.py27compat'
82082 INFO: Import to be excluded not found: 'setuptools.py33compat'
82083 INFO: Loading module hook 'hook-sqlite3.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
82249 INFO: Loading module hook 'hook-sysconfig.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
82250 INFO: Loading module hook 'hook-wcwidth.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
82259 INFO: Loading module hook 'hook-xml.dom.domreg.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
82261 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
82262 INFO: Loading module hook 'hook-xml.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
82263 INFO: Loading module hook 'hook-zope.interface.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
82271 INFO: Loading module hook 'hook-_tkinter.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
82444 INFO: checking Tree
82444 INFO: Building Tree because Tree-00.toc is non existent
82445 INFO: Building Tree Tree-00.toc
82518 INFO: checking Tree
82518 INFO: Building Tree because Tree-01.toc is non existent
82519 INFO: Building Tree Tree-01.toc
82610 INFO: checking Tree
82611 INFO: Building Tree because Tree-02.toc is non existent
82611 INFO: Building Tree Tree-02.toc
82623 INFO: Loading module hook 'hook-lxml.isoschematron.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
82633 INFO: Loading module hook 'hook-lxml.objectify.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
82635 INFO: Loading module hook 'hook-pythoncom.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
83072 INFO: Loading module hook 'hook-pywintypes.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
83507 INFO: Loading module hook 'hook-win32com.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
84211 INFO: Loading module hook 'hook-setuptools.msvc.py' from 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
84434 INFO: Looking for ctypes DLLs
84450 WARNING: library ApplicationServices required via ctypes not found
84474 WARNING: library user32 required via ctypes not found
84514 WARNING: library msvcrt required via ctypes not found
84518 WARNING: library msvcrt required via ctypes not found
84627 INFO: Analyzing run-time hooks ...
84646 INFO: Including run-time hook 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py'
84672 INFO: Including run-time hook 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgres.py'
84689 INFO: Including run-time hook 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_win32api.py'
84690 INFO: Including run-time hook 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_win32comgenpy.py'
84693 INFO: Including run-time hook 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_mplconfig.py'
84703 INFO: Including run-time hook 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth__tkinter.py'
84704 INFO: Including run-time hook 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pyqt5.py'
84707 INFO: Including run-time hook 'c:\\users\\user-pc\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pyside2.py'
84763 INFO: Looking for dynamic libraries
93160 INFO: Looking for eggs
93160 INFO: Using Python library c:\users\user-pc\appdata\local\programs\python\python38-32\python38.dll
93161 INFO: Found binding redirects:
[]
93189 INFO: Warnings written to C:\Users\User-PC\Desktop\PyQt5_Projects\PackagingTutorials\MyApp\build\MainFile\warn-MainFile.txt
93642 INFO: Graph cross-reference written to C:\Users\User-PC\Desktop\PyQt5_Projects\PackagingTutorials\MyApp\build\MainFile\xref-MainFile.html
93808 INFO: Appending 'datas' from .spec
93850 INFO: checking PYZ
93851 INFO: Building PYZ because PYZ-00.toc is non existent
93852 INFO: Building PYZ (ZlibArchive) C:\Users\User-PC\Desktop\PyQt5_Projects\PackagingTutorials\MyApp\build\MainFile\PYZ-00.pyz
99017 INFO: Building PYZ (ZlibArchive) C:\Users\User-PC\Desktop\PyQt5_Projects\PackagingTutorials\MyApp\build\MainFile\PYZ-00.pyz completed successfully.
99116 INFO: checking PKG
99116 INFO: Building PKG because PKG-00.toc is non existent
99118 INFO: Building PKG (CArchive) PKG-00.pkg
99333 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
99335 INFO: Bootloader c:\users\user-pc\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\bootloader\Windows-32bit\runw.exe
99336 INFO: checking EXE
99336 INFO: Building EXE because EXE-00.toc is non existent
99337 INFO: Building EXE from EXE-00.toc
99440 INFO: Copying icons from ['icon.ico']
99520 INFO: Writing RT_GROUP_ICON 0 resource with 20 bytes
99520 INFO: Writing RT_ICON 1 resource with 67624 bytes
99538 INFO: Appending archive to EXE C:\Users\User-PC\Desktop\PyQt5_Projects\PackagingTutorials\MyApp\build\MainFile\MainFile.exe
104960 INFO: Building EXE from EXE-00.toc completed successfully.
104968 INFO: checking COLLECT
104968 INFO: Building COLLECT because COLLECT-00.toc is non existent
104969 INFO: Building COLLECT COLLECT-00.toc
146452 INFO: Building COLLECT COLLECT-00.toc completed successfully.

For Inno Setup, I tried to post the codes here but they exceed the maximum allowable limit. I have uploaded two .txt files using file.io, which can be found here:

  1. The configuration is: https://file.io/dIHSftLfBJur
  2. The debug output is: https://file.io/7Gn8G5clRdyX

One solution is presented here for Mac OS (I have Windows 10): PyInstaller exe returning error on a Tkinter script

I don't know how to implement it in Windows and also I don't know if it can solve this headache problem or not

Finally, I have:

  • Python version: 3.8.3 (32-bit)
  • Tk version: 8.6.9
  • PyCharm version: 2019.1.3

Hoping to see someone can solve or give me a hint to solve this stiff problem

1
From your description it appears that the problem is with the installer that Inno creates. But you haven't told us anything about your Inno config file or what Inno says in the course of creating the installer. - BoarGules
Hi BoarGules, I have edited my post. The INNO config file and debug output are provided. - Sitra

1 Answers

0
votes

I got the answer from the contributors of PyInstaller package on github. I'm posting the solution here in case anyone faces the same problem:

You quite definitely don't need to list every file in the [files] field and I'm guessing that you've just made an error in there. Use:

[Files] Source: "MainFile/*"; DestDir: "{app}"

You seem to have collapsed the dest folder which should be where the MainFile folder is written to. Can you tell us where it went?