Kivy on Beagle Bone Black - 为何无法使用pygame?

时间:2017-11-17 14:01:01

标签: python pygame kivy beagleboneblack

我试图让Kivy在BBB上工作。我已成功将SGX驱动程序(omaplfb& pvrsrvkm for 4.3.3内核)安装为described here以启用OpenGLES。然后Kivy从debian存储库安装,但显然有些东西仍然不太正确。

# Attempting to execute demo code on a 800x480 screen
root@arm> kivy/examples/demo/pictures# python main.py -k --size=800x480
[INFO   ] Kivy v1.8.0
[INFO   ] [Logger      ] Record log in /root/.kivy/logs/kivy_17-11-17_23.txt
[INFO   ] [Factory     ] 157 symbols loaded
[DEBUG  ] [Cache       ] register <kv.lang> with limit=None, timeout=Nones
[DEBUG  ] [Cache       ] register <kv.image> with limit=None, timeout=60s
[DEBUG  ] [Cache       ] register <kv.atlas> with limit=None, timeout=Nones
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_pygame, img_gif (img_pil ignored)
[DEBUG  ] [Cache       ] register <kv.texture> with limit=1000, timeout=60s
[DEBUG  ] [Cache       ] register <kv.shader> with limit=1000, timeout=3600s
[DEBUG  ] [App         ] Loading kv <./pictures.kv>
[DEBUG  ] [Window      ] Ignored <egl_rpi> (import error)
[INFO   ] [Window      ] Provider: pygame(['window_egl_rpi'] ignored)
[DEBUG  ] [WinPygame   ] Set window to fake fullscreen mode
[WARNING] [WinPygame   ] Video: failed (multisamples=2)
[WARNING] [WinPygame   ] trying without antialiasing
[ERROR  ] [Window      ] Unable to use pygame
[ERROR  ] [Window      ] The module raised an important error: 'OpenGL not available'
 Traceback (most recent call last):
   File "main.py", line 73, in <module>
     PicturesApp().run()
   File "/usr/lib/python2.7/dist-packages/kivy/app.py", line 765, in run
     self.load_kv(filename=self.kv_file)
   File "/usr/lib/python2.7/dist-packages/kivy/app.py", line 585, in load_kv
     root = Builder.load_file(rfilename)
   File "/usr/lib/python2.7/dist-packages/kivy/lang.py", line 1444, in load_file
     return self.load_string(data, **kwargs)
   File "/usr/lib/python2.7/dist-packages/kivy/lang.py", line 1491, in load_string
     parser = Parser(content=string, filename=fn)
   File "/usr/lib/python2.7/dist-packages/kivy/lang.py", line 1049, in __init__
     self.parse(content)
   File "/usr/lib/python2.7/dist-packages/kivy/lang.py", line 1119, in parse
     self.execute_directives()
   File "/usr/lib/python2.7/dist-packages/kivy/lang.py", line 1083, in execute_directives
     mod = __import__(package)
   File "/usr/lib/python2.7/dist-packages/kivy/core/window/__init__.py", line 1041, in <module>
     ), True)
   File "/usr/lib/python2.7/dist-packages/kivy/core/__init__.py", line 62, in core_select_lib
     cls = cls()
   File "/usr/lib/python2.7/dist-packages/kivy/core/window/__init__.py", line 479, in __init__
     self.create_window()
   File "/usr/lib/python2.7/dist-packages/kivy/core/window/window_pygame.py", line 140, in create_window
     raise CoreCriticalException(e.message)
 kivy.core.CoreCriticalException: OpenGL not available

# Note that output device is a framebuffer device
> fbset -i -fb /dev/fb0

mode "800x480"
    geometry 800 480 800 480 16
    timings 0 0 0 0 0 0 0
    accel true
    rgba 5/11,6/5,5/0,0/0
endmode

Frame buffer device information:
    Name        : 
    Address     : 0x9e900000
    Size        : 2304000
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 1
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 1600
    Accelerator : No

更多说明:

  • Pygame样本正在运行,所以我确信pygame及其 依赖应该没问题。
  • DISPLAY =#&34;:0&#34;
  • SDL_VIDEODRIVER =&#34; FBCON&#34;

0 个答案:

没有答案