[Solved] Kivy broken in Ubuntu 17.10

I upgraded to Ubuntu 17.10 and it appears that it breaks Kivy. According to Reddit the solution is to compile from source. I’m going to try and see what happens.

1 Like

I was not diligent in writing down the commands that I did, but I did get it to work by mostly following the Kivy manual installation instructions and then adding some packages that was needed from this Kivy issue thread.

Your mileage may vary.

2 Likes

Thanks for the update that it worked :sunny:

Bash command history?

Good call @mooselake, in case anyone else needs to see their Bash history

$ cat ~/.bash_history

These are the commands that I used, not totally sure if all of them are needed. I would stick with uninstalling the apt repository version of kivy and installing manually with the additional libraries. The numpy and other things are probably not necessary.

As you can see it was a very roundabout road, and I’m not totally sure which libraries fixed the problem, but those were the commands that I used, and Ground Control is working for me.

# at first I thought I would get the latest kivy and update, but that did not work
sudo add-apt-repository ppa:kivy-team/kivy
sudo apt update
sudo apt install python-kivy
python2.7 main.py # failed to start ground control
# then I followed a useless set of internet threads that said numpy was the problem, no change
pip uninstall numpy
sudo pip uninstall numpy
python2.7 main.py # still no joy without numpy
sudo pip2 uninstall numpy
sudo pip2.7 uninstall numpy
sudo /usr/bin/pip2.7 uninstall numpy
python2.7 main.py # still no joy without numpy

# uninstall the existing kivy
# upgrade cython, except it might be better to use the pip install so you get the right version
# install a bunch of libraries (not sure which ones are important)
# pip magic
sudo pip uninstall kivy
sudo pip2 uninstall kivy
sudo pip install --upgrade Cython
sudo apt-get install python-setuptools python-pygame python-opengl   python-gst0.10 python-enchant gstreamer0.10-plugins-good python-dev   build-essential libgl1-mesa-dev-lts-quantal libgles2-mesa-dev-lts-quantal  python-pip
sudo pip install pygments docutils
sudo pip install --upgrade pip virtualenv setuptools
sudo pip install kivy
# turns out the version of cython matters
sudo pip install Cython==0.25.2
sudo pip install kivy
python2.7 main.py # ground control still not working, install more libraries
sudo apt-get install libsdl2-2.0-0 libsdl2-image-2.0-0 libsdl2-mixer-2.0-0 libsdl2-ttf-2.0-0
python2.7 main.py # ground control still not working, install more libraries 
sudo apt-get install python-setuptools python-pygame python-opengl python-gst0.10 python-enchant gstreamer0.10-plugins-good python-dev build-essential libgl1-mesa-dev libgles2-mesa-dev python-pip libgstreamer1.0-dev
sudo apt-get install python-setuptools python-pygame python-opengl python-enchant python-dev build-essential libgl1-mesa-dev libgles2-mesa-dev python-pip libgstreamer1.0-dev
python2.7 main.py # finally! ground control works

2 Likes

Thanks for the your steps here! It really helped me out. I think what solved my problem on Ubuntu 17.10 was running the commands you had for installing the libraries. After running the following:

sudo apt-get install libsdl2-2.0-0 libsdl2-image-2.0-0 libsdl2-mixer-2.0-0 libsdl2-ttf-2.0-0
sudo apt-get install python-setuptools python-pygame python-opengl python-gst0.10 python-enchant gstreamer0.10-plugins-good python-dev build-essential libgl1-mesa-dev libgles2-mesa-dev python-pip libgstreamer1.0-dev
sudo apt-get install python-setuptools python-pygame python-opengl python-enchant python-dev build-essential libgl1-mesa-dev libgles2-mesa-dev python-pip libgstreamer1.0-dev

I had to re-run the Ground Control linux requirements.
pip install -r requirements_linux.txt

kivy finally installed correctly with no complaints.

Then I was finally able to run Ground Control! Yay!

3 Likes

Can you summarize that and put it in the wiki, or post it for one of the experienced Wikiers?

Confirmed that GC stopped working after upgrading Ubuntu Mate from 17.04 to 17.10.
Installing Cython 0.23 and kivy 1.9.1 fixed the issue for me.

2 Likes