kivy hello world not working in Ubuntu 18.04.3, python3, virtualbox, kivy 1.11.1
See original GitHub issueI’m getting an error with the hello world example on the kivy.org front page. All basic packages are installed on plain vanilla Ubuntu. The PPA provides the latest stable build and I’ve got the updated kivy version v1.11.1 on Ubuntu 18.04.3.
The hello world on kivy.org front page should work in plain vanilla Ubuntu in Virtualbox 6.0 with 3D graphics accerleration turned OFF.
What’s the deal?
Thank youuuuuuu
Versions
- Python: 3.6.8
- OS: Ubuntu 18.04.3
- Kivy: v1.11.1
- Kivy installation method:
sudo add-apt-repository ppa:kivy-team/kivy
, thensudo apt-get install python3-kivy
Description
I’m getting this error: [CRITICAL] [Window ] Unable to find any valuable Window provider.
Code
from kivy.app import App
from kivy.uix.button import Button
class TestApp(App):
def build(self):
return Button(text='Hello World')
TestApp().run()
Log
[INFO ] [Logger ] Record log in /home/user/.kivy/logs/kivy_19-09-03_11.txt
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/usr/lib/python3/dist-packages/kivy/__init__.py"
[INFO ] [Python ] v3.6.8 (default, Jan 14 2019, 11:02:34)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]
[INFO ] [Python ] Interpreter at "/usr/bin/python3"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_pil, img_gif (img_sdl2, img_ffpyplayer ignored)
[INFO ] [Text ] Provider: pil(['text_sdl2'] ignored)
[CRITICAL] [Window ] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
egl_rpi - ImportError: cannot import name 'bcm'
File "/usr/lib/python3/dist-packages/kivy/core/__init__.py", line 63, 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 - ImportError: libSDL2_image-2.0.so.0: cannot open shared object file: No such file or directory
File "/usr/lib/python3/dist-packages/kivy/core/__init__.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "/usr/lib/python3/dist-packages/kivy/core/window/window_sdl2.py", line 27, in <module>
from kivy.core.window._window_sdl2 import _WindowSDL2Storage
x11 - ModuleNotFoundError: No module named 'kivy.core.window.window_x11'
File "/usr/lib/python3/dist-packages/kivy/core/__init__.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
[CRITICAL] [App ] Unable to get a Window, abort.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:12 (3 by maintainers)
Top Results From Across the Web
kivy and python3 doesnt work on ubuntu 18.04 - Stack Overflow
Solution for me was, with Python 3.6.5. Uninstall everything: sudo apt-get remove --purge python3-kivy sudo pip3 uninstall cython kivy sudo ...
Read more >Install Kivy on Ubuntu 18.04. not working
Install openssl package. sudo apt install openssl. This should do it.If not fixed and if you are using python3 then you may install:...
Read more >Deploying Your Kivy/Python App to Android with Buildozer
Follow along with me as I deploy a simple Hello World Python / Kivy application to an Android phone. I used a Windows...
Read more >Python Kivy tutorial #1 : Install Kivy, Buildozer, compile *apk
This Python Kivy Tutorial is about installing Python Kivy framework and Buildozer on Ubuntu (Xubuntu) machine, how to compile kivy to apk ...
Read more >Source Packages in "bionic", Subsection misc - Ubuntu
... aspectj-maven-plugin (1.11-1~18.04) [universe] [security]; assemblytics (0~20170131+ds-2) [universe]; assertj-core (2.3.0-4) [universe] ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
actually, it would be great to update the installation section in docs at first.
hello, yes, the problem seems to be a missing
apt-get
dependency when installing thepython3-kivy
package.From the Ubuntu installation instructions it appears the only install step for python3 is this:
That command completes successfully and installs (or requires) the package
libsdl2-2.0-0
which is the SDL2 library. This is necessary but incomplete.The
python3-sdl2
dependency should also be included to provide the python bindings to the libsdl2 library. So, following the firstapt-get
installation line with:installs the remaining necessary packages and the
hello, world
example from kivy.org’s front page works once again.For what it’s worth, the
libsdl2-image-2.0-0
package was the single package that seemed to cause thehello, world
example to fail. This package was a dependency on thepython3-sdl2
installation but curiously was not removed with the removal ofpython3-sdl2
.There were several other dependent packages installed with the
python3-sdl2
package and thelibsdl2-image-2.0-0
package just happened to be the make-it-or-break-it package on my plain vanilla install to test thehello, world
example.My final conclusion is this seems to be an
apt
package dependency issue forpython3
. I don’t know how to convey this to the right people other than posting here.Can someone make the proper reporting connections to the development team?