I'm trying to build an exe file from a python game using PyBox2D and Pyglet.
Unable to import the back-end pyglet: module 'gui.backends' has no attribute 'pyglet_framework'<\/code>
I guess this happens because this file only gets imported indirectly\/hidden from another file with __import__()<\/code>
From the directory \/SpaceJam\/building<\/code> I've tried calling:
pyinstaller.exe --onefile "../game/spacejam.py" --hidden-import="gui/framework/backends/pyglet_framework.py"
pyinstaller.exe --onefile "../game/spacejam.py" --hidden-import="../gui/framework/backends/pyglet_framework.py"
pyinstaller.exe --onefile "../game/spacejam.py" --hidden-import="../gui/framework/backends/pyglet_framework"
pyinstaller.exe --onefile "../game/spacejam.py" --hidden-import="../gui/framework/backends/*"
That argument expects a module name<\/em><\/a> , not a filesystem path. How would you import<\/code> it?
--hidden-import gui.backends.pyglet_framework
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.