I'm trying to create a standalone executable with pyinstaller.
I use a win10 venv using vmware, where I've got a clean python version installed.
I can execute my .py file as usual but if I try to run my .exe file I get the following error:
So far I've tried:
- importing px manually in my script (
import px) - using the command
pyinstaller servicetool.spec --hidden-import=pxinstead ofpyinstaller servicetool.spec. - using
pip install px, which says its already installed. - to add
hiddenimports=['px']to my .spec file, attached here
block_cipher = None
a = Analysis(['C:\\Users\\philipp\\Desktop\\Servicetool\\Servicetool.py'],
pathex=['C:\\Users\\philipp\\Desktop\\Servicetool'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
a.datas += [('Favicon.ico', 'C:\\Users\\philipp\\Desktop\\Servicetool\\Favicon.ico', 'DATA')]
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='servicetool',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
icon='C:\\Users\\philipp\\Desktop\\Servicetool\\Favicon.ico')
Sorry for my bad english, I'm new to programming so please ask if you need some more information. Thanks for your help and best regards
