2

myapp.py is workable. After compiling exe, occure errors. Kivy: v1.10.1 Python: v3.6.5

Simply myapp.py runs good without compiling. It contains only one button.

myapp.spec:

# -*- mode: python -*-
from kivy.deps import sdl2, glew
block_cipher = None


a = Analysis(['myapp.py'],
             pathex=['C:\\Users\\Username\\Desktop\\test'],
             binaries=[],
             datas=[],
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher,
             noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          [],
          exclude_binaries=True,
          name='myapp',
          debug=False,
          bootloader_ignore_signals=False,
          strip=False,
          upx=True,
          console=True )
coll = COLLECT(exe,
               a.binaries,
               a.zipfiles,
               a.datas,
               *[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)],
               strip=False,
               upx=True,
               name='myapp')

Console:

[CRITICAL] Text: Unable to find any valuable Text provider.
sdl2 - ImportError: DLL load failed: Не найдена указанная процедура.
  File "D:\Python\lib\site-packages\kivy\core\__init__.py", line 59, in core_select_lib
    fromlist=[modulename], level=0)
  File "D:\Python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
    exec(bytecode, module.__dict__)
  File "D:\Python\lib\site-packages\kivy\core\text\text_sdl2.py", line 12, in <module>
    from kivy.core.text._text_sdl2 import (_SurfaceContainer, _get_extents,

pil - ModuleNotFoundError: No module named 'PIL'
  File "D:\Python\lib\site-packages\kivy\core\__init__.py", line 59, in core_select_lib
    fromlist=[modulename], level=0)
  File "D:\Python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
    exec(bytecode, module.__dict__)
  File "D:\Python\lib\site-packages\kivy\core\text\text_pil.py", line 7, in <module>
    from PIL import Image, ImageFont, ImageDraw

[CRITICAL] App: Unable to get a Text provider, abort.

What's problem and what I need to do? Thanks in advance.

Killen
  • 21
  • 3
  • Possible duplicate of [Kivy error, \[CRITICAL\] \[Text \] unable to find any valuable text provider (python 3.6.1) (windows 10)](https://stackoverflow.com/questions/45655558/kivy-error-critical-text-unable-to-find-any-valuable-text-provider-python) – wpercy Apr 30 '19 at 20:43
  • Make sure you follow the kivy documentation https://kivy.org/doc/stable/installation/installation.html – smitty_werbenjagermanjensen May 01 '19 at 12:32

1 Answers1

0
python -m pip install opencv-contrib-python-headless
python -m pip install pyenchant
python -m pip install cython
python -m pip install Pillow
Killen
  • 21
  • 3
  • Welcome to Stack Overflow! While this code snippet may solve the problem, it doesn't explain why or how it answers the question. Please [include an explanation for your code](//meta.stackexchange.com/q/114762/269535), as that really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion. – Samuel Philipp May 01 '19 at 13:12