python - 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?
谁能知道我得到了这个错误?
解决方案
我有一个 Raspberry Pi 3 并遇到了这个问题。
如该线程中所述,您需要启用 Legacy GL 驱动程序。您可以通过运行sudo raspi-config
然后进入Advanced Options
>> GL Driver
Select来执行此操作Legacy
。
如果您有任何疑问或问题,请告诉我。
推荐阅读
- javascript - React 的 Hook 调用无效?
- c++ - 返回 str 与 str.substr(0,str.size()) 在 leetcode 中给了我不同的输出
- python - 包含可选小数的正则表达式
- python - “str”对象在 Tkinter 回调中没有属性“get”
- ios - 如何计算 SwiftUI 中的标签栏高度?
- r - R读取(Excel,txt ...)带有条件的行和列
- python - 在函数定义之前立即导入依赖项是一种好习惯吗?
- c# - C# 按上次创建(最旧的记录)排序并将 DynamoDB 表中的结果限制为 20 条记录
- mysql - 我的 MySQL 查询中有未知错误。你可以帮帮我吗?
- c++ - C++手动分配和初始化对象