Sunday 31 October 2021

pyinstaller kivy error Unable to get any Image provider, abort

hi i create a kivy python with pyinstaller in virtualenv

my program run in console with command python cipol.py is run successfully wihout no error but when create exe with pyinstaller with command pyinstaller cipol.spec

it will return

[INFO ] [Factory ] 186 symbols loaded

[INFO ] [Image ] Providers: (img_tex, img_dds, img_ffpyplayer, img_pil, img_sdl2 ignored)

[CRITICAL] [App ] Unable to get any Image provider, abort.

this is my spec file:

# -*- mode: python ; coding: utf-8 -*-
from kivy_deps import sdl2, glew
import os
os.environ['KIVY_IMAGE'] = 'pil,sdl2'
from importlib import __import__

block_cipher = None


a = Analysis(['C:\\Users\\user\\Desktop\\cipol-kivy\\exe\\venv\\Lib\\sync\\cipol.py'],
         pathex=['C:\\Users\\user\\Desktop\\cipol-kivy\\exe\\venv\\Lib\\sync'],
         binaries=[],
         datas=[],
         hiddenimports=['win32file','win32timezone'],
         hookspath=[],
         runtime_hooks=[],
         excludes=[],
         win_no_prefer_redirects=False,
         win_private_assemblies=False,
         cipher=block_cipher,
         noarchive=False)
a.datas += [('logo.png','C:\\Users\\user\\Desktop\\cipol-kivy\\exe\\venv\\Lib\\sync\\logo.png','DATA'), ('style.kv', 'C:\\Users\\user\\Desktop\\cipol-kivy\\exe\\venv\\Lib\\sync\\style.kv', 'DATA')]

pyz = PYZ(a.pure, a.zipped_data,
         cipher=block_cipher)
exe = EXE(pyz,
      a.scripts,
      [],
      exclude_binaries=True,
      name='cipolsync',
      debug=True,
      bootloader_ignore_signals=False,
      strip=False,
      upx=True,
      console=True,
      icon='C:\\Users\\user\\Desktop\\cipol-kivy\\exe\\venv\\Lib\\sync\\cipol.ico')
coll = COLLECT(exe,
            Tree('C:\\Users\\user\\Desktop\\cipol-kivy\\exe\\venv\\Lib\\sync\\'),
           a.binaries,
           a.zipfiles,
           a.datas,
           *[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)],
           strip=False,
           upx=True,
           upx_exclude=[],
           name='cipolsync')


from pyinstaller kivy error Unable to get any Image provider, abort

No comments:

Post a Comment