falukky
falukky

Reputation: 1139

Kivy error: Unable to get a Text provider, abort

So i try this code:

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


class FirstKivy(App):

    def build(self):
        return Label(text="Hello Kivy!")

FirstKivy().run()

And got this error:

[INFO ] [Logger ] Record log in C:\Users\raviv.kivy\logs\kivy_19-04-17_45.txt [INFO ] [Kivy
] v1.10.1 [INFO ] [Python ] v3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52) [MSC v.1916 32 bit (Intel)] [INFO ] [Factory
] 194 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. sdl2 - ImportError: DLL load failed: The specified module could not be found. File "C:\Users\jim\csv_file\lib\site-packages\kivy\core__init__.py", line 59, in core_select_lib fromlist=[modulename], level=0) File "C:\Users\jim\csv_file\lib\site-packages\kivy\core\text\text_sdl2.py", line 12, in from kivy.core.text._text_sdl2 import (_SurfaceContainer, _get_extents,

pil - ModuleNotFoundError: No module named 'PIL' File "C:\Users\jim\csv_file\lib\site-packages\kivy\core__init__.py", line 59, in core_select_lib fromlist=[modulename], level=0) File "C:\Users\jim\csv_file\lib\site-packages\kivy\core\text\text_pil.py", line 7, in from PIL import Image, ImageFont, ImageDraw

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

So i found this post and install all that mentioned:

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 
pip install –-upgrade kivy

And still got this error

Upvotes: 1

Views: 4092

Answers (3)

someone
someone

Reputation: 1

I had this error, I solved it by installing PIL (Pillow) just type

pip install Pillow

Upvotes: 0

VuDoan
VuDoan

Reputation: 1

I had the exact same problem as yours until I wrapped the class inside an if statement. It goes like this:

class MyApp(App):
    def build(self):
        return Label(text='Hey');

if __name__ == '__main__':
    MyApp().run();

Upvotes: -1

Cl0ud-l3ss
Cl0ud-l3ss

Reputation: 185

try either

pip install kivy.deps.glew

or

pip install kivy.deps.angle

Remove one to see if the error changes; i'd imagine its angle. I had a similar problem with a grahics card driver.You also don't need gstreamer (right now)

Upvotes: 0

Related Questions