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