I created a main.exe file by using python pyinstaller with this command line
pyinstaller main.py --onefile
Then, if I run the main.exe file it just blinks and then disappears. Running the .exe from command line generates this error.
[INFO ] [Logger ] Record log in C:\Users\davide.tamagnini.con\.kivy\logs\kivy_21-07-05_84.txt
[INFO ] [Kivy ] v2.0.0
[INFO ] [Kivy ] Installed at "C:\Users\DAVIDE~1.CON\AppData\Local\Temp\_MEI78722\kivy\__init__.pyc"
[INFO ] [Python ] v3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Users\davide.tamagnini.con\Desktop\kivy-Galaxy\main.exe"
[INFO ] [Factory ] 186 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] GLEW initialization succeeded
[INFO ] [GL ] Backend used <glew>
[INFO ] [GL ] OpenGL version <b'4.6.0 - Build 27.20.100.8337'>
[INFO ] [GL ] OpenGL vendor <b'Intel'>
[INFO ] [GL ] OpenGL renderer <b'Intel(R) HD Graphics 620'>
[INFO ] [GL ] OpenGL parsed version: 4, 6
[INFO ] [GL ] Shading version <b'4.60 - Build 27.20.100.8337'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <32>
[WARNING] [Image ] Unable to load image <C:\Users\DAVIDE~1.CON\AppData\Local\Temp\_MEI78722\kivy_install\data\glsl\default.png>
[CRITICAL] [Window ] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
sdl2 - Exception: SDL2: Unable to load image
File "kivy\core\__init__.py", line 70, in core_select_lib
File "kivy\core\window\window_sdl2.py", line 152, in __init__
File "kivy\core\window\__init__.py", line 982, in __init__
File "kivy\core\window\window_sdl2.py", line 311, in create_window
File "kivy\core\window\__init__.py", line 1268, in create_window
File "kivy\graphics\instructions.pyx", line 783, in kivy.graphics.instructions.RenderContext.__init__
File "kivy\core\image\__init__.py", line 561, in __init__
File "kivy\core\image\__init__.py", line 754, in _set_filename
File "kivy\core\image\__init__.py", line 460, in load
File "kivy\core\image\__init__.py", line 223, in __init__
File "kivy\core\image\img_sdl2.py", line 47, in load
[INFO ] [Audio ] Providers: audio_sdl2 (audio_ffpyplayer ignored)
[CRITICAL] [App ] Unable to get a Window, abort.
This file should execute a small game with user interaction. I put the main.exe file in the same directory where all the dependencies are contained.
If I run the main.py file using PyCharm everything works well.
Did anyone face the same problem?