[PYTHON] Try to prepare each environment of kivy

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.

Usage 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.

Linux environment (CentOS 7 version)

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?

Window environment (Windows 10 Pro)

Basically, I proceeded with the installation procedure below, but I will note that there was a slight catch.

kivy installation for windows

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.

bonus

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()

Summary

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

Try to prepare each environment of kivy
Try to make a kernel of Jupyter
How to prepare Python development environment [Mac]
Introduction to Python Let's prepare the development environment
Note: Prepare the environment of CmdStanPy with docker
Prepare the execution environment of Python3 with Docker
From Kivy environment construction to displaying Hello World
Try to simulate the movement of the solar system
Procedure to set hydrogen of atom (virtual environment)
[Cloud9] Try to build an environment with django 1.11 of Python 3.4 without understanding even 1 mm
Try to solve the problems / problems of "Matrix Programmer" (Chapter 1)
Try to estimate the number of likes on Twitter
Example of pytest environment to fix database with Docker
Ssh to virtual environment with remote development of vscode
Unification of Python environment
Try to implement yolact
Switch the setting value of setting.py according to the development environment
Try to get the function list of Python> os package
A memo on how to easily prepare a Linux exercise environment
Try to evaluate the performance of machine learning / regression model
Pros and cons of converting Django's development environment to Docker
Check the operation of Python for .NET in each environment
Try to evaluate the performance of machine learning / classification model
Enabled to input Japanese in Linux environment (crostini) of Chromebook
Try to improve the accuracy of Twitter like number estimation
Try to solve the problems / problems of "Matrix Programmer" (Chapter 0 Functions)
Try to automate the operation of network devices with Python
Change the volume of Pepper according to the surrounding environment (sound)
[Django] Memo to create an environment of Django + MySQL + Vue.js [Python]
Overview of Python virtual environment and how to create it
Try to extract the features of the sensor data with CNN