GroundControl/kivy error: Unable to find any valuable Window provider

I haven’t yet figured out how to launch GroundControl. I’m running ubuntu with both python 3 and 2.7 installed. “python” on the command line launches python 3, whereas “/usr/bin/python” launches python 2.7, so my approach is to cd to the GroundControl directory and then type

/usr/bin/python main.py

I get the following:

[e[1;32mINFOe[0m ] [Logger ] Record log in /home/john/.kivy/logs/kivy_18-06-02_3.txt
[e[1;32mINFOe[0m ] [Kivy ] v1.10.1.dev0, git-Unknown, 20180602
[e[1;32mINFOe[0m ] [Python ] v2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609]
[e[1;32mINFOe[0m ] [Factory ] 194 symbols loaded
[e[1;32mINFOe[0m ] [Image ] Providers: img_tex, img_dds, img_pil, img_gif (img_sdl2, img_ffpyplayer ignored)
[e[1;31mCRITICALe[0m] [Window ] Unable to find any valuable Window provider.
egl_rpi - ImportError: cannot import name bcm
File “/usr/lib/python2.7/dist-packages/kivy/core/init.py”, line 59, in core_select_lib
fromlist=[modulename], level=0)
File “/usr/lib/python2.7/dist-packages/kivy/core/window/window_egl_rpi.py”, line 12, in
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/python2.7/dist-packages/kivy/core/init.py”, line 59, in core_select_lib
fromlist=[modulename], level=0)
File “/usr/lib/python2.7/dist-packages/kivy/core/window/window_sdl2.py”, line 26, in
from kivy.core.window._window_sdl2 import _WindowSDL2Storage

x11 - ImportError: No module named window_x11
File “/usr/lib/python2.7/dist-packages/kivy/core/init.py”, line 59, in core_select_lib
fromlist=[modulename], level=0)

[e[1;32mINFOe[0m ] [Text ] Provider: pil([‘text_sdl2’] ignored)
[e[1;31mCRITICALe[0m] [App ] Unable to get a Window, abort.

Here’s the kivy log:
kivy_18-06-02_3.txt (1.4 KB)

did you try to launch with -> python2 main.py ?
I don’t need the /usr/bin/

1 Like

That works, in the sense that I don’t need the /usr/bin/, either, but I get the same error.

I assume that not all dependencies are installed for python2. I will check tonight on my Manjaro with Python2 and 3 how I did that.

2 Likes

OK
./bash_history revealed that I had a quite a struggle :slight_smile:
It’s all about where to add the 2 on a system with python2 + 3.
Since this is arch, replace the ‘sudo pacman -S’ with ‘sudo apt-get install’.
Note that kivy does not need the 2. (Needs a 3 if intended for python3 {not for GC})
Notice the last line. At one point I noticed an error and with the help of this forum, after installing >xclip and xsel< all runs fine.
Sorry I don’t have the time today to check which of my tries are the correct ones :-/ .
Hope it helps anyway.

/.arduino
ls
arduino
./arduino
./arduino
python -V
sudo pacman -Syu
pacman -Ss pip
pacman -Ss python-pip
pacman -Ss pyserial
pacman -Ss kivy
pacman -Qdt
sudo pacman -Rs $(pacman -Qdtq)
sudo pacman -S python-kivy
usermod -aG dialout maslow
gpasswd -a maslow uucp
sudo gpasswd -a maslow uucp
sudo gpasswd -a maslow lock
ls
cd arduino-1.8.3
./arduino
sudo pacman -S gimp
ls
python main.py
sudo pacman -S python2
python2 main.py
pacman -Ss kivy
sudo pacman -S python2-kivy
python2 main.py
pip install pyserial
sudo pip install pyserial
sudo pip install pyserial2
sudo pip2 install pyserial
sudo pacman -S pip2
pip list
sudo pacman -S python-pip2
sudo pacman -S python2-pip
python2 main.py
sudo pip2 install pyserial
python2 main.py
python2 main.py
python2 main.py
cd …
python2 main.py
pip list
pip2 list
python2 -V
cd …
./arduino
python2 main.py
python2 main.py
./arduino
uname -a
sudo pacman -S python2-kivy
./arduino
python2 main.py
python2 main.py
python2 main.py
python2 main.py
./arduino
python2 main.py
./arduino
./arduino
ls
./arduino
python2 main.py
python2 main.py
python2 main.py
python2 main.py
python2 main.py
python2 main.py
python2 main.py
sudo pacman -S xclip xsel

1 Like

It may help to forget about distro packages as far as possible. You “should” only need three (explictly mentioned) distro packages: virtualenv, cython, and build tools/headers (the “build-essential” package, on debian, ubuntu, and other debian-likes).

  1. Install the required distro packages. On debian, apt install virtualenv cython build-essential.
  2. Build a virtual environment for ground control. Assuming you want it in just your home directory, you can do: virtualenv --python python2 ~/groundcontrol_env
  3. Activate that python virtual environment: source ~/groundcontrol_env/bin/activate.sh
  4. Download the latest “source code (.tar.gz)” file from the GroundControl github projects’ Releases page.
  5. Untar that archive: “tar xvzf GroundControl*.tar.gz”. This will create a GroundControl directory.
  6. Enter that directory: cd GroundControl*
  7. (something, because the next step fails with an error about Cython.distutils. Maybe the ubunto distro package of cython is too old?
  8. Using the activated python environment, install the dependencies that it GroundControl already lists in a text file: “pip install -r requirements_linux.txt”
  9. run groundcontrol wwith ~/groundcontrol_env/bin/python ~/GroundControl*/main.py
1 Like