gpt4 book ai didi

python - Kivy 错误,[严重] [文本] 无法找到任何有值(value)的文本提供程序 (python 3.6.1) (windows 10)

转载 作者:太空狗 更新时间:2023-10-29 20:46:54 24 4
gpt4 key购买 nike

我一直在尝试在 pycharm 中使用 Kivy (1.10.0) 来测试安装:

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


class TutorialApp(App):

def build(self):
return Button(text='Hello Kivy')

if __name__ == '__main__':
TutorialApp().run()

这也尝试用“标签”代替“按钮”

我两次在 pycharm 中运行时都得到了这个:

[INFO   ] [Logger      ] Record log in C:\Users\Denise\.kivy\logs\kivy_17-08-12_56.txt
[INFO ] [Kivy ] v1.10.0
[INFO ] [Python ] v3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 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\Denise\AppData\Local\Programs\Python\Python36-32\lib\site-packages\kivy\core\__init__.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "C:\Users\Denise\AppData\Local\Programs\Python\Python36-32\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 "C:\Users\Denise\AppData\Local\Programs\Python\Python36-32\lib\site-packages\kivy\core\__init__.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "C:\Users\Denise\AppData\Local\Programs\Python\Python36-32\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.

在 python 3.6.1 shell 中键入以下内容时出现同样的错误:

from kivy.uix.button import Button

from kivy.uix.button import Lable

请帮忙,如何让 Kivy 运行?

最佳答案

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

这将解决所有问题

关于python - Kivy 错误,[严重] [文本] 无法找到任何有值(value)的文本提供程序 (python 3.6.1) (windows 10),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45655558/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com