Last time, I found out that various environments are required to use kivy.
So, it will be an article to build and prepare each environment.
--Mac (built) --Windows (here article, OS setup completed) --CentOS7 (here article, OS setup completed)
When I thought that CentOS would end quickly, I noticed a surprisingly difficult fact. Someone who doesn't know how to install Cython.
Ubuntu?Gentoo?Fedora? CentOS7 Delicious Les (^ q ^) If you think about it, as mentioned earlier, here is the account that is orz when installing Cython.
For the time being, installing Cython seems like a path for everyone, but I dare to pass through the wisdom of the ancestors and install it on my own.
I thought that I should enter with such a pip, and when I tried it casually, it became like this.
$ pip install cython
bash: pip:The command was not found...
Hey. Chikusho. I wonder if pip is also an environment, CentOS is Zako. It can't be helped to complain, so I will proceed by executing the command as follows.
$ sudo yum install epel-release
$ sudo yum install python-pip SDL2 SDL2_ttf SDL2_image SDL2_mixer gstreamer python-devel freeglut-devel
$ sudo pip install pip setuptools --upgrade
$ sudo pip install Cython
$ sudo pip install kivy pygame
There may be other libraries you need, but as of February 16, 2017 this worked fine.
$ sudo pip install kivy
Requirement already satisfied: Kivy-Garden>=0.1.4 in /usr/lib/python2.7/site-packages (from kivy)
Requirement already satisfied: requests in /usr/lib/python2.7/site-package (from Kivy-Garden>=0.1.4->kivy)
Installing collected packages: kivy
Running setup.py install for kivy ... done
Successfully installed kivy-1.9.1
Lightly check if it works the same as when kivy was installed on early Macs.
python xxxx.py
It was OK until the operation check. Next is the build with pyinstaller.
python -m PyInstaller --name xxxx ./xxxx.py
This passed the build. Execution was also OK. The practice was also OK o r z
After all, that's right. Is it necessary for each environment ... Developers cry?
Basically, I proceeded with the installation procedure below, but I will note that there was a slight catch.
There are three places that are jammed.
--It has been used since python3.x --Microsoft Visual C ++ 14.0 is required to install Cython and use Microsoft Visual C ++ Build Tools. - http://landinghub.visualstudio.com/visual-cpp-build-tools --Since Cython is required to install kivy, run python -m pip install cython --Glew is required to install kivy, so install glew from http://glew.sourceforge.net/
Please let me know if it works. I will try again. Linux, Mac is a serious god environment.
Code used to check the operation of kivy
import kivy
kivy.require('1.0.6')
from kivy.app import App
from kivy.uix.label import Label
class MyApp(App):
def build(self):
return Label(text='Hello world')
if __name__ == '__main__':
MyApp().run()
tired. .. .. I was happy to build a development environment that I could do multi-platform development, but I didn't understand the Windows development environment at all. I'm a former Windows user. Compared to developing on Mac or Linux, developing Windows may be quite troublesome. Rather, I feel that the development environment for Mac and Linux is more complete.
Windows users are unlikely to return for the time being.
Recommended Posts