0

so iam trying to start with kivy. so i first tried to just run an simple code, but it does give me an error i cant fix?

import kivy
from kivy.app import App
from kivy.uix.label import Label


class MyApp(App):
    def build(self):
        return Label(text="Test")


if __name__ == "__main__":
    MyApp().run()

if i run this code the console gives me this output:


[INFO   ] [Logger      ] Record log in C:\Users\Gamer\.kivy\logs\kivy_19-11-19_85.txt
[INFO   ] [Kivy        ] v1.11.0
[INFO   ] [Kivy        ] Installed at "C:\Users\Gamer\PycharmProjects\TimeDrillerv1\venv\lib\site-packages\kivy\__init__.py"
[INFO   ] [Python      ] v3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52) [MSC v.1916 32 bit (Intel)]
[INFO   ] [Python      ] Interpreter at "C:\Users\Gamer\PycharmProjects\TimeDrillerv1\venv\Scripts\python.exe"
[INFO   ] [Factory     ] 184 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_gif (img_sdl2, img_pil, img_ffpyplayer ignored)
[CRITICAL] [Text        ] Unable to find any valuable Text 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 - ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
  File "C:\Users\Gamer\PycharmProjects\TimeDrillerv1\venv\lib\site-packages\kivy\core\__init__.py", line 63, in core_select_lib
    fromlist=[modulename], level=0)
  File "C:\Users\Gamer\PycharmProjects\TimeDrillerv1\venv\lib\site-packages\kivy\core\text\text_sdl2.py", line 13, in <module>
    from kivy.core.text._text_sdl2 import (_SurfaceContainer, _get_extents,

pil - ModuleNotFoundError: No module named 'PIL'
  File "C:\Users\Gamer\PycharmProjects\TimeDrillerv1\venv\lib\site-packages\kivy\core\__init__.py", line 63, in core_select_lib
    fromlist=[modulename], level=0)
  File "C:\Users\Gamer\PycharmProjects\TimeDrillerv1\venv\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.

Process finished with exit code 1

what is wrong?

Icaruz
  • 13
  • 6

1 Answers1

0

try

pip install --upgrade pip wheel setuptools
pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
pip install kivy.deps.gstreamer
pip install kivy.deps.angle

https://github.com/kivy/kivy/issues/5859

Enable debug level logging to check detailed report of what is failing.

from kivy.config import Config
Config.set('kivy', 'log_level', 'debug')
Config.write()
abhilb
  • 5,639
  • 2
  • 20
  • 26
  • didnt worked for me. i use pycharm and it looks like it doesnt chaned anythink at all ;p – Icaruz Nov 19 '19 at 21:21
  • does it still show Unable to get a Window? – abhilb Nov 19 '19 at 21:23
  • i have found the solution for the window problem. and it was because of pycharm. it used the python37 - 32 directory to get the installed modules, while pip installs everythink into python37 - 65 (bit) so i changed the directory and now it works :) – Icaruz Nov 19 '19 at 21:36
  • heres the post with the answer: https://stackoverflow.com/questions/49466785/kivy-error-python-2-7-sdl2-import-error – Icaruz Nov 19 '19 at 21:36