gpt4 book ai didi

python - 无法在 Ubuntu Wily 上运行 Kivy

转载 作者:太空宇宙 更新时间:2023-11-04 08:04:30 25 4
gpt4 key购买 nike

我是 python 和 kivy 的新手,我想运行我的第一个 kivy 程序。当我运行该程序时出现此错误:

/usr/bin/python3.4 /home/mmu/PycharmProjects/ShipControl/gui/gui.py
[INFO ] [Logger ] Record log in /home/mmu/.kivy/logs/kivy_15-11-29_0.txt
[INFO ] [Kivy ] v1.9.0
[INFO ] [Python ] v3.4.3+ (default, Oct 14 2015, 16:03:50)
[GCC 5.2.1 20151010]
[INFO ] [Factory ] 173 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_gif, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO ] [OSC ] using <multiprocessing> for socket
[INFO ] [Window ] Provider: sdl2(['window_egl_rpi'] ignored)
[CRITICAL ] [Window ] Unable to find any valuable Window provider at all!
egl_rpi - ImportError: cannot import name 'bcm'
File "/usr/lib/python3/dist-packages/kivy/core/__init__.py", line 57, in core_select_lib
fromlist=[modulename], level=0)
File "/usr/lib/python3/dist-packages/kivy/core/window/window_egl_rpi.py", line 12, in <module>
from kivy.lib.vidcore_lite import bcm, egl

sdl2 - TypeError: expected bytes, str found
File "/usr/lib/python3/dist-packages/kivy/core/__init__.py", line 65, in core_select_lib
cls = cls()
File "/usr/lib/python3/dist-packages/kivy/core/window/window_sdl2.py", line 121, in __init__
super(WindowSDL, self).__init__()
File "/usr/lib/python3/dist-packages/kivy/core/window/__init__.py", line 616, in __init__
self.create_window()
File "/usr/lib/python3/dist-packages/kivy/core/window/window_sdl2.py", line 171, in create_window
self.fullscreen, resizable, state)
File "kivy/core/window/_window_sdl2.pyx", line 60, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window (kivy/core/window/_window_sdl2.c:1379)

x11 - ImportError: No module named 'kivy.core.window.window_x11'
File "/usr/lib/python3/dist-packages/kivy/core/__init__.py", line 57, in core_select_lib
fromlist=[modulename], level=0)

[CRITICAL ] [App ] Unable to get a Window, abort.

Process finished with exit code 1

我已经使用安装了kivy

sudo apt-get install python3-kivy

我错过了什么吗?当我搜索这些错误时,我发现有人建议安装 pygame,但这似乎是一个死项目?

最佳答案

我16.04也出现过这个问题。

我的解决方案是删除 ubuntu 包(为了省事)并使用 pip 安装:

sudo apt-get remove python3-kivy
sudo pip3 install kivy

关于python - 无法在 Ubuntu Wily 上运行 Kivy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33988387/

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