kivy installation windows : This tutorial explains the steps for installing Kivy on a Windows machine (mine is Windows 7; I'll test it on Windows 10.1 to see if it's any different--If so, I'll let you know) Python installation on Windows using kivy (64 or 32 bit):-
The gstramer is used and we copy it from kivy distribution directory.
The C:\dev\python27\lib\distutils .
Then we download and install cython by typing,
Pip install cython
We ensure the python tool as up-to-date,
Python –m pip install –upgrade pip wheels setup tools
Then, Python –m pip install docutils pigments pypiwin 32 kivy
We install the kivy into an existing 32 or 64 bit Python installation.
At http://www.lfd.uci.edu/~gohlke/pythonlibs/#kivy
Python installed in C:\dev\python27:
We need the MinGW installation and use the MinGW as directory included in kivy distribution,
Then use gstreamer to copy it from kivy distribution directory.
Then we get kivy.bat file from kivy distribution and set path.
We download and install distutils and pip then use ez_setup.py and get_pip.py from link as http://www.pip-installer.org/en/latest/installing.html.
C:\dev\python27\Lib\distutils create a empty distutils.cfg.file,
Compiler=mingw32
Then download and install cython by typing:
Pip install cython
Download Glew 1.5.7 from http://sourceforge.net/proects/glew//files/glew/
Glew32.dll->C:\dev\python27
Glew32.dll->MinGW\lib
Glew32.dll->MinGW\lib
Glew32.dll->MinGW\lib
glew.h->MinGW\include\GL
glxew.h->MinGW\include\GL
wglew.h->MinGW\include\GL
If you get errors while installing kivy as GL/glew.h: No such file or directory, this is observed with the 64 bit mingw.
Then we copy the GL directory and its contents into python27/include and the *.dll and *.lib files from above into python27/libs.
Then still if we get errors then type the following to generate the .a file:-
Cd C:\dev\python27\libs
Rename glew32.lib old_glew32.lib
Rename glew32.lib old_glew32s.lib
Gendef glew32.dll
Dlltool—dllname glew32.dll—def glew32—output-lib libglew32.a
Install the precompiled Pygame 1.9.2 binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame.
To install the kivy,
Pip install https://github.com/kivy/kivy/zipball/master
The githup zipball will point to a specific kivy zip file.
If you have a development version of kivy and want to continue working on installing it you can use the pip –editable,
Pip install –editable C:\dev\kivy
They depend on python libraries ad pygame, gstreamer, PIL.etc.
Installation steps:-
First we have to open a command prompt and go to your pip installation path.
Then we have the latest pip and wheel,
Pip install—upgrade pip wheel setup tools
Install dependencies
Pip install docutils pigments pypiwin 32.deps.sdl2 kivy.deps.glew
Pip install kivy.deps.angle
Install kivy as,
Pip instll kivy
From kivy.uix.label import label
From kivy.app import App
Class MyApp (App):
Def build (self):
Return label (text=’Hello world’)
If_name__==’__main__’:
MyApp ().run ()