Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] python3-kivy won't work  (Read 2545 times)

Archie

  • Guest
[EN] python3-kivy won't work
« on: 2016/08/04, 11:48:17 »
Hi everybody...
I'm trying to help a friend with a project using python3 with kivy, but I'm having some serious issues trying to run it. I also installed the python2 version, which works fine, but in python3 kivy is unable to initialise a simple window (with kivy installed using apt-get). Here is the complete traceback:
Code: [Select]
jay@AwesomeBox:~$ py main.py
[INFO   ] [Logger      ] Record log in /home/jay/.kivy/logs/kivy_16-08-04_1.txt
[INFO   ] [Kivy        ] v1.9.1
[INFO   ] [Python      ] v3.5.2 (default, Jul  5 2016, 11:33:36)
[GCC 5.4.0 20160609]
[INFO   ] [Factory     ] 179 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_gif, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO   ] [Text        ] Provider: sdl2
[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 59, 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 67, in core_select_lib
    cls = cls()
  File "/usr/lib/python3/dist-packages/kivy/core/window/window_sdl2.py", line 138, in __init__
    super(WindowSDL, self).__init__()
  File "/usr/lib/python3/dist-packages/kivy/core/window/__init__.py", line 722, in __init__
    self.create_window()
  File "/usr/lib/python3/dist-packages/kivy/core/window/window_sdl2.py", line 237, in create_window
    self.fullscreen, resizable, state)
  File "kivy/core/window/_window_sdl2.pyx", line 94, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window (kivy/core/window/_window_sdl2.c:1936)

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

[CRITICAL] [App         ] Unable to get a Window, abort.
 Exception ignored in: 'kivy.properties.dpi2px'
 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/kivy/utils.py", line 513, in __get__
     retval = self.func(inst)
   File "/usr/lib/python3/dist-packages/kivy/metrics.py", line 175, in dpi
     EventLoop.ensure_window()
   File "/usr/lib/python3/dist-packages/kivy/base.py", line 126, in ensure_window
     sys.exit(1)
 SystemExit: 1
[CRITICAL] [App         ] Unable to get a Window, abort.
I googled around, and this seems to be quite a problem on debian and ubuntu based distributions, and many possible solutions have been mentioned, none of which seem to work for me.
Is anyone using python3-kivy on siduction? Help would be much appreciated.
                                      Archie...  8)

Ps. I am running the KDE version of paintitblack, in case that becomes relevant.