kivy: Unable to find any valuable Window provider (undefined symbol: glGetFramebufferAttachmentParameteriv)
* prepare a short, runnable example that reproduces the issue
* reproduce the problem with the latest development version of Kivy
* double-check that the issue is indeed a bug and not a support request
Versions
- Python: Python 3.5.2
- OS: Ubuntu 16.04.3 LTS
- Kivy: v1.10.0
- Kivy installation method:
- Instructions from https://kivy.org/docs/installation/installation-linux.html#installation-in-a-virtual-environment
- First install dependencies: python-pip build-essential git python python-dev ffmpeg libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev zlib1g-dev
- Further dependencies: libgstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good
- Install Cython:
pip install Cython==0.25.2
- Install Pillow:
pip install image
- Install Kivy:
pip install kivy
Description
I’m trying to install kivy on Ubuntu 16.04, which is running in a Virtual Box (Version 5.1.26r117224 (Qt5.6.2) ). This is the latest version of Virtual Box. The Host OS is Windows 10.
Disabling the 3D acceleration leads to another SDL2 error:
sdl2 - RuntimeError: b'GLX is not supported'
File "/home/aadc/tf_python/lib/python3.5/site-packages/kivy/core/__init__.py", line 67, in core_select_lib
cls = cls()
File "/home/aadc/tf_python/lib/python3.5/site-packages/kivy/core/window/window_sdl2.py", line 140, in __init__
super(WindowSDL, self).__init__()
File "/home/aadc/tf_python/lib/python3.5/site-packages/kivy/core/window/__init__.py", line 899, in __init__
self.create_window()
File "/home/aadc/tf_python/lib/python3.5/site-packages/kivy/core/window/window_sdl2.py", line 269, in create_window
self.fullscreen, resizable, state)
File "kivy/core/window/_window_sdl2.pyx", line 142, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window (/tmp/pip-build-jka1zi38/kivy/kivy/core/window/_window_sdl2.c:2782)
File "kivy/core/window/_window_sdl2.pyx", line 57, in kivy.core.window._window_sdl2._WindowSDL2Storage.die (/tmp/pip-build-jka1zi38/kivy/kivy/core/window/_window_sdl2.c:1872)
So maybe the error is anyhow related to the 3D acceleration (device), used by VirtualBox?
Code
Reproduce the issue in interactive python console:
python
>>> import kivy
>>> from kivy.core.window import Window
Full Error Output
>>> import kivy
Purge log fired. Analysing...
Purge finished!
[INFO ] [Logger ] Record log in /home/aadc/.kivy/logs/kivy_17-08-23_1.txt
[INFO ] [Kivy ] v1.10.0
[INFO ] [Python ] v3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609]
>>> from kivy.core.window import Window
[INFO ] [Factory ] 194 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (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.
egl_rpi - ImportError: cannot import name 'bcm'
File "/home/aadc/tf_python/lib/python3.5/site-packages/kivy/core/__init__.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "/home/aadc/tf_python/lib/python3.5/site-packages/kivy/core/window/window_egl_rpi.py", line 12, in <module>
from kivy.lib.vidcore_lite import bcm, egl
sdl2 - ImportError: /home/aadc/tf_python/lib/python3.5/site-packages/kivy/graphics/cgl_backend/cgl_gl.cpython-35m-x86_64-linux-gnu.so: undefined symbol: glGetFramebufferAttachmentParameteriv
File "/home/aadc/tf_python/lib/python3.5/site-packages/kivy/core/__init__.py", line 67, in core_select_lib
cls = cls()
File "/home/aadc/tf_python/lib/python3.5/site-packages/kivy/core/window/window_sdl2.py", line 140, in __init__
super(WindowSDL, self).__init__()
File "/home/aadc/tf_python/lib/python3.5/site-packages/kivy/core/window/__init__.py", line 899, in __init__
self.create_window()
File "/home/aadc/tf_python/lib/python3.5/site-packages/kivy/core/window/window_sdl2.py", line 269, in create_window
self.fullscreen, resizable, state)
File "kivy/core/window/_window_sdl2.pyx", line 110, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window (/tmp/pip-build-jka1zi38/kivy/kivy/core/window/_window_sdl2.c:2466)
File "kivy/graphics/cgl.pyx", line 52, in kivy.graphics.cgl.cgl_get_backend_name (/tmp/pip-build-jka1zi38/kivy/kivy/graphics/cgl.c:3044)
File "kivy/graphics/cgl.pyx", line 60, in kivy.graphics.cgl.cgl_get_backend_name (/tmp/pip-build-jka1zi38/kivy/kivy/graphics/cgl.c:2879)
File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 906, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "kivy/graphics/cgl_backend/cgl_glew.pyx", line 9, in init kivy.graphics.cgl_backend.cgl_glew (/tmp/pip-build-jka1zi38/kivy/kivy/graphics/cgl_backend/cgl_glew.c:3260)
x11 - ImportError: No module named 'kivy.core.window.window_x11'
File "/home/aadc/tf_python/lib/python3.5/site-packages/kivy/core/__init__.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
>>> quit()
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 23 (7 by maintainers)
pip install pygame fixed the issue for me
Ubuntu-linux 17.10 64bit Python 3.6.3
pip freeze buildozer==0.35.dev0 certifi==2018.4.16 chardet==3.0.4 Cython==0.28.2 docutils==0.14 idna==2.6 Kivy==1.10.0 Kivy-Garden==0.1.4 pexpect==4.5.0 plyer==1.3.1.dev0 ptyprocess==0.5.2 pygame==1.9.3 Pygments==2.2.0 requests==2.18.4 urllib3==1.22 virtualenv==15.2.0
On Windows, glew and sdl2 are required as dependencies. I had the same problem. Installing all the dependencies
python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
@frankgould
Ultimately, your guess is as good as mine (or better, you can actually test stuff on an RPi 😉 but what I gathered from tito’s post is that the default backend tries to access an OpenGL API whereas SDL is a bit smarter and (I assume in addition) probes for a OpenGL ES API. These are not quite the same.
And I don’t know why Virtualbox would only run OpenGL ES, either, I haven’t looked into it any further since then. Also, I get
[INFO ] [GL ] OpenGL version <b'2.1 Chromium 1.9'>
in my VM which would indicate it’s not OpenGL ES, so… 🤔Anyway, according to the docs RPi only uses the OpenGL ES, that’s why I’m assuming it won’t help you any to fiddle with those settings, and this bug is unrelated (obviously doesn’t hurt to try, though).
I think the first log you posted in your report indicates that sdl2 isn’t actually used? If you don’t specify anything then the default on *nix should be
gl
, as inKIVY_GL_BACKEND=gl
. On my VM in “sdl2 mode” (as inKIVY_GL_BACKEND=sdl2
) I get a[INFO ] [GL ] Backend used <sdl2>
in my log, whereas you have[INFO ] [GL ] Backend used <gl>
in the log attached there.That’s a nice offer, but I might have a better idea: As there are not too many people who have the necessary knowledge and the hardware to properly troubleshoot this, it would probably help a lot to instead create a ~KVM~ or ~Virtualbox~ image with your setup (or provide instructions for it).
If you can reproduce the problem in a VM*, people who don’t have an RPi would be able to help you much more easily.
But we should probably move that to over your own issue, then.
Edit: If you’re going to try to put this together on a VM, KVM/Virtualbox won’t do because RPi is ARM. You’d have to find instructions for QEMU. Confusingly, sometimes KVM and QEMU are mentioned together, because they work with each other. Anyway, what we’d need is to run ARM on x86 (the EMU part in QEMU stands for emulator), and “just using a VM” won’t do. I’m looking into that for a bit.
*No guarantees, though — stuff is tricky as you can see, and in this specific bug report here the cause is trying Kivy on a VM instead of a real machine.
@pythonic64 I was facing the same issue. Your solution solved the problem on my Windows machine, thank-you.