Good day,
While trying to make a standalone (--onefile) exe with Pyinstaller, I ran into a strange error. The execution does not find two .dll even though they were properly packed into the exe and are properly placed into a temp/_MEIPASSxxxxx
folder at runtime, as the screenshots below show. This does not happen on the development computer.
I added my data (icon & readme) in this folder too thanks to this thread and the program has no problem with finding them, so the issue is only with binaries and not data apparently. Also there is no problem at all in --onedir mode, only --onefile.
Here is my .spec:
# -*- mode: python -*-
block_cipher = None
import sys
sys.setrecursionlimit(5000)
added_binaries = [
("python36.dll", "."),
("api-ms-win-crt-runtime-l1-1-0.dll", ".")
]
added_data = [
("PilotageIcon.png", "."),
("PilotageREADME.pdf", ".")
]
a = Analysis(['Pilotage.py'],
pathex=['C:\\Users\\local-adm\\Desktop\\Lucas\\Keithley\\2018 07 18'],
binaries=added_binaries,
datas=added_data,
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='Pilotage',
debug=True,
strip=False,
upx=True,
runtime_tmpdir=None,
console=True,
icon='PilotageIcon.ico'
)
I read many other threads here but they do not match my situation as clearly the files are there, so I don't understand why the errors. Thank you in advance.
Python version: 3.6.3
Pyinstaller version: 3.3.1