The script runs fine but compiled with pyinstaller throws an error in runtime:
Traceback (most recent call last):
File "poples.py", line 3, in <module>
ModuleNotFoundError: No module named 'arcade'
[5316] Failed to execute script 'poples' due to unhandled exception!
Arcade(latest version:2.6.15) is installed on my python folder:
C:\Users\Sarp\AppData\Local\Programs\Python\Python310\Lib\site-packages
as well as installed in my project virtual enviroment folder
What I did so far:
Fresh start: delete venv folder and recreate new
using pycharms requirement.txt, I reinstalled all the required packages again
I run
pyi-makespec
inside my project folder:pyi-makespec --onefile --windowed --icon=icon.ico poples.py
Edit the spec file line:
hiddenimports=[],
tohiddenimports=['arcade'],
andconsole=False
toconsole=True
(to see runtime error)It looks like this:
block_cipher = None a = Analysis( ['poples.py'], pathex=[], binaries=[], datas=[], hiddenimports=['arcade'], hookspath=[], hooksconfig={}, runtime_hooks=[], excludes=[], win_no_prefer_redirects=False, win_private_assemblies=False, cipher=block_cipher, noarchive=False, ) pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) exe = EXE( pyz, a.scripts, a.binaries, a.zipfiles, a.datas, [], name='poples', debug=False, bootloader_ignore_signals=False, strip=False, upx=True, upx_exclude=[], runtime_tmpdir=None, console=True, disable_windowed_traceback=False, argv_emulation=False, target_arch=None, codesign_identity=None, entitlements_file=None, icon='icon.ico', )
run pyinstaller inside my project folder pyinstaller poples.spec
run the script through command promt
got an error