I use pyinstaller
to create onefile exe
. It works on few computers but one. I can't work out why. There is no error when I run this from command window. I can see a window for point of a second and it dissapear. Below is my spec
file. There is no antivirus installed. Also windows firewall is shut down.
SPEC
from kivy.deps import sdl2, glew
block_cipher = None
a = Analysis(['main.py'],
pathex=['C:\\Users\\Patryk\\GUI\\EXE'],
binaries=None,
datas=None,
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,Tree('C:\\Users\\PycharmProjects\\GUI\\EXE'),
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
*[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)],
name='Bajot2',
debug=False,
strip=False,
upx=True,
console=False,
runtime_tmpdir=None,
icon='main_logo.ico' )
I've managed to see the error. That's makes me closer to solve it.
ERROR
[INFO ] [Logger ] Record log in C:\Users\Dell\.kivy\logs\kivy_19-07-02_7.
txt
[INFO ] [Kivy ] v1.10.1
[INFO ] [Python ] v3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1
900 64 bit (AMD64)]
[INFO ] [Factory ] 194 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil
, img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2
[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.2.0 - Build 10.18.10.3262'>
[INFO ] [GL ] OpenGL vendor <b'Intel'>
[INFO ] [GL ] OpenGL renderer <b'Intel(R) HD Graphics 4600'>
[INFO ] [GL ] OpenGL parsed version: 4, 2
[INFO ] [GL ] Shading version <b'4.20 - Build 10.18.10.3262'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <16>
[WARNING] [Image ] Unable to load image <C:\Users\Dell\AppData\Local\Temp\
_MEI40162\kivy_install\data\glsl\default.png>
[CRITICAL] [Window ] Unable to find any valuable Window provider.
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 140, in __init__
File "site-packages\kivy\core\window\__init__.py", line 968, in __init__
File "site-packages\kivy\core\window\window_sdl2.py", line 294, in create_wind
ow
File "site-packages\kivy\core\window\__init__.py", line 1216, in create_window
File "kivy\graphics\instructions.pyx", line 759, in kivy.graphics.instructions
.RenderContext.__init__
File "site-packages\kivy\core\image\__init__.py", line 536, in __init__
File "site-packages\kivy\core\image\__init__.py", line 732, in _set_filename
File "site-packages\kivy\core\image\__init__.py", line 435, in load
File "site-packages\kivy\core\image\__init__.py", line 201, in __init__
File "site-packages\kivy\core\image\img_sdl2.py", line 41, in load
[CRITICAL] [App ] Unable to get a Window, abort
.