[solved]Kivy issues in Fedora 27

Referencing the Kivy Linux Installation, I saw that the versions aligned in the default requirements_linux.txt seemed to be off. After trying several different combinations, and removing packages via pip when those versions failed, I found that Cython 21.2 and Kivy 1.9 worked for me leaving me with this as the contents of my requirements_linux.txt

appdirs==1.4.3
Cython==0.21.2
Kivy==1.9
Kivy-Garden==0.1.4
packaging==16.8
pygame==1.9.3
pyparsing==2.2.0
pyserial==3.3
requests==2.13.0
six==1.10.0

Hope this helps someone else (assuming that there are other Fedora users out there).

2 Likes

I just installed on Fedora 27 as well. To make sure everything works, I did a quick vagrant build as well.

Setup

$ vagrant init fedora/27-cloud-base
$ vagrant up
$ vagrant ssh
...
$ cat /etc/fedora-release 
Fedora release 27 (Twenty Seven)

Dependencies

These commands are what should be run locally. I use both Python 2 and 3. If you don’t, you can remove one or the other. I pulled the dependencies from the official docs.

$ sudo dnf install -y mercurial automake gcc{,-c++} python{2,3}{,-pip}
$ sudo dnf install -y {SDL2,gstreamer,SDL_ttf,SDL_mixer,mesa-libGLES}{,-devel} {mtdev,python{2,3}}-devel
$ sudo dnf install -y python{2,3}-{pillow{,-devel},enchant}

Python 2

It works perfectly with Python 2.

$ pip2 install --user Cython==0.21.2
$ pip2 install --user Kivy==1.9
$ python2 -c 'import kivy'
[WARNING] [Config      ] Older configuration version detected (0 instead of 13)
[WARNING] [Config      ] Upgrading configuration in progress.
[INFO   ] [Logger      ] Record log in /home/vagrant/.kivy/logs/kivy_18-01-29_0.txt
[INFO   ] [Kivy        ] v1.9.0
[INFO   ] [Python      ] v2.7.14 (default, Jan 17 2018, 14:28:32) 
[GCC 7.2.1 20170915 (Red Hat 7.2.1-2)]

Python 3

However, Kivy fails to build with Python 3. It seems that an old bug has returned.

$ pip3 install --user Cython==0.21.2
$ pip3 install --user Kivy==1.9
...
     TypeError: can't pickle Cython.Compiler.FlowControl.NameAssignment objects

Teardown

$ exit
$ vagrant halt
$ vagrant destroy

Conclusions

  • @brookswillet is pretty rad. Thanks for providing the initial solution.
  • This will still work for Python 2
  • This won’t currently work for Python 3 (but I’m not quite sure why, and I’d bet I’ve screwed something up)

Glad you were able to take my bread crumbs and improve on them. I fully
intend to write up a container that would auto-update firmware,
dependencies, etc. I just haven’t made the time to make it happen.

If you set up a virtual Python environment, that would allow you to keep
Python 3 as your default and only use Python 2 for Ground Control.

1 Like

FWW- GroundControl is Python 2 only at this time as far as I know.

Thank you

1 Like