Kivy. Text provider error

10,224

Solution 1

You are missing the SDL TTF library required by PyGame. On Ubuntu, this is a system package called "libsdl-ttf2.0-dev". I think on CentOS it is called "SDL_ttf-devel". You can ensure you have the rest of the PyGame dependencies installed by looking at this PyGame install for RedHat page.

Solution 2

According to kivy.core.text code:

...

# Load the appropriate provider

Label = core_select_lib('text', (
    ('pygame', 'text_pygame', 'LabelPygame'),
    ('sdlttf', 'text_sdlttf', 'LabelSDLttf'),
    ('pil', 'text_pil', 'LabelPIL'),
))

if 'KIVY_DOC' not in os.environ:
    if not Label:
        from kivy.logger import Logger
        import sys
        Logger.critical('App: Unable to get a Text provider, abort.')
        sys.exit(1)

...

, your system is missing required package. Install one of them first.

Solution 3

Try to install Pillow

pip install Pillow

Solution 4

I know this is an old post. I though of adding this if some body is searching for the same issue...

For Fedora 25 the best is to install "pygame"

dnf install pygame
dnf install pygame-devel

For me this resolved the issue.

Further to setup working Kivy environment in Fedora (I use Fedora 25), make sure all the dependencies are installed as below,

 dnf install make
 dnf install mercurial
 dnf install automake
 dnf install gcc
 dnf install gcc-c++
 dnf install SDL_ttf-devel
 dnf install SDL_mixer-devel
 dnf install khrplatform-devel
 dnf install mesa-libGLES
 dnf install mesa-libGLES-devel
 dnf install gstreamer-plugins-good
 dnf install gstreamer
 dnf install gstreamer-python
 dnf install mtdev-devel
 dnf install python-devel
 dnf install python-pip
 dnf install pygame
 dnf install pygame-devel

I mentioned those as separate commands as some of these comes by default.

Ref: https://kivy.org/docs/installation/installation-linux.html#fedora

Solution 5

just be sure that you already have all dependencies installed, look at the installation section of the kivy wiki

Share:
10,224
Lissomort
Author by

Lissomort

assistant of Computer Science Department, Kherson State unversity

Updated on August 05, 2022

Comments

  • Lissomort
    Lissomort almost 2 years

    Start a simple sample of "Hello world". And got an error.

    [CRITICAL] [Text        ] Unable to find any valuable Text provider at all!
    [CRITICAL] [App         ] Unable to get a Text provider, abort.
    

    Is it mean that I have no some font libs? Tried to install dev libs of actual fonts in system.

    System: Centos. Python version 2.7