首页 > 解决方案 > kivy 错误:* 未能添加服务 - 已在使用中?在树莓派中

问题描述

我的 Kivy 代码不适用于覆盆子 pi4 我已经安装了每个 pip kivy 但仍然无法正常工作。!

我在终端中收到此错误:

[INFO   ] [Logger      ] Record log in /home/pi/.kivy/logs/kivy_21-04-17_18.txt
[INFO   ] [Kivy        ] v1.11.1
[INFO   ] [Kivy        ] Installed at "/home/pi/.local/lib/python2.7/site-packages/kivy/__init__.pyc"
[INFO   ] [Python      ] v2.7.16 (default, Oct 10 2019, 22:02:15) 
[GCC 8.3.0]
[INFO   ] [Python      ] Interpreter at "/usr/bin/python"
[WARNING] [Deprecated  ] Python 2 Kivy support has been deprecated. The Kivy release after 1.11.0 will not support Python 2 anymore
[INFO   ] [Factory     ] 184 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO   ] [Window      ] Provider: egl_rpi
* failed to add service - already in use?

谁能知道我得到了这个错误?

标签: pythonraspberry-pikivyraspberry-pi4

解决方案


我有一个 Raspberry Pi 3 并遇到了这个问题。

如该线程中所述,您需要启用 Legacy GL 驱动程序。您可以通过运行sudo raspi-config然后进入Advanced Options>> GL DriverSelect来执行此操作Legacy

如果您有任何疑问或问题,请告诉我。


推荐阅读