I wish to use pyinstaller to create an executable for my Python script. The executable is created, but the running of it crashes.
Traceback (most recent call last):
File "PyInstaller\hooks\rthooks\pyi_rth_pkgres.py", line 170, in <module>
File "PyInstaller\hooks\rthooks\pyi_rth_pkgres.py", line 37, in _pyi_rthook
File "PyInstaller\loader\pyimod02_importers.py", line 450, in exec_module
File "pkg_resources\__init__.py", line 42, in <module>
File "PyInstaller\loader\pyimod02_importers.py", line 450, in exec_module
File "plistlib.py", line 70, in <module>
File "PyInstaller\loader\pyimod02_importers.py", line 450, in exec_module
File "xml\parsers\expat.py", line 4, in <module>
ImportError: DLL load failed while importing pyexpat:
The specified module could not be found.
with ChatGPT i concluded i miss pyexpat.dll on my computer.
I use Python 3.12.4 on a ‘64bit’ on ‘WindowsPE’. Python was installed as part of Anaconda3 and would like to prevend the solution “reinstall python”.
Any suggestions?
Kind regards,
Johannes