1

I am new to kivy and I was able to finally finish my project and compile it into a single executable using pyinstaller and its spec file.

If I try to launch it on a machine with no kivy or python installation it always fails with this error (Below).

I have looked and researched amny articles but most of them assume that kivy or the path of the missing png or gstreamer to be in the PATH but my machines where I am trying to launch does not have python or kivy.

Can someone please help me here? Thank you for your time.


[WARNING           ] [Image       ] Unable to load image <C:\Users\ace\AppD
ata\Local\Temp\_MEI65~1\kivy_install\data\glsl\default.png>

[CRITICAL          ] [Window      ] Unable to find any valuable Window provider
at all!

sdl2 - Exception: SDL2: Unable to load image

File "site-packages\kivy\core\__init__.py", line 67, in core_select_lib

File "site-packages\kivy\core\window\window_sdl2.py", line 138, in __init__

File "site-packages\kivy\core\window\__init__.py", line 722, in __init__

File "site-packages\kivy\core\window\window_sdl2.py", line 255, in create_window

File "site-packages\kivy\core\window\__init__.py", line 897, in create_window

File "kivy\graphics\instructions.pyx", line 756, in kivy.graphics.instructions

.RenderContext.__init__ (kivy\graphics\instructions.c:10729)

File "site-packages\kivy\core\image\__init__.py", line 512, in __init__

File "site-packages\kivy\core\image\__init__.py", line 700, in _set_filename

File "site-packages\kivy\core\image\__init__.py", line 430, in load

File "site-packages\kivy\core\image\__init__.py", line 198, in __init__

File "site-packages\kivy\core\image\img_sdl2.py", line 42, in load

[CRITICAL          ] [App         ] Unable to get a Window, abort.
trahane
  • 701
  • 6
  • 16
Ace
  • 11
  • 1
  • Did you move the entire directory? I think by default a directory gets created and you need all of that files to run it. – syntonym Sep 22 '16 at 21:06
  • I did a --onefile to get a standalone exe. If I build it normally and launch from directory its fine but it does not work when done from standalone. – Ace Sep 22 '16 at 22:47
  • @Ace Have you tried [this way](http://stackoverflow.com/a/36021330/5994041) of packaging? Maybe you haven't put those lines into your app, so it can't actually find the folder extracted in TEMP. – Peter Badida Sep 23 '16 at 15:33
  • do you have sdl2 installed? – Amin Etesamian Sep 23 '16 at 16:51
  • I know this is an old post, but I recently had the same issue and it was resolved [here](https://stackoverflow.com/questions/54154373/pyinstalled-kivy-app-fails-to-run-on-second-machine/54161529#54161529). Just in case you were still interested. – BodneyC Jan 12 '19 at 20:38
  • I know this comment is late but as per my experience the only worked solution is [this](https://stackoverflow.com/a/51745051/8440358) – Hasitha Jayawardana Dec 24 '20 at 09:05

0 Answers0