qq_34553081
qq_34553081
2018-12-06 03:17

kivy开发环境配置问题

40
  • kivy
  • centos

我想在centos7上配置kivy的开发环境
我先pip install Cython-0.2.0
然后pip install kivy

from kivy.app import App
from kivy.uix.button import Button

class TestApp(App):
def build(self):
return Button(text='Hello,kivy')

if name == '__main__':
TestApp().run()

在启动的时候报错,下面是启动日志:
[INFO ] [Logger ] Record log in /root/.kivy/logs/kivy_18-12-05_9.txt
[INFO ] [Kivy ] v1.10.1
[INFO ] [Python ] v2.7.5 (default, Oct 30 2018, 23:45:53)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
[INFO ] [Factory ] 194 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_gif (img_pygame, img_pil, img_ffpyplayer ignored)
[CRITICAL] [Text ] Unable to find any valuable Text provider.
pygame - ImportError: No module named pygame
File "/opt/zrj/env/lib/python2.7/site-packages/kivy/core/__init__.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "/opt/zrj/env/lib/python2.7/site-packages/kivy/core/text/text_pygame.py", line 12, in
import pygame

pil - ImportError: No module named PIL
File "/opt/zrj/env/lib/python2.7/site-packages/kivy/core/__init__.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "/opt/zrj/env/lib/python2.7/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.

请各位大佬解惑

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐

换一换