安装 Kivy

Kivy 是基于Python编程语言的一种用于开发跨平台GUI客户端程序的框架。可以打包成iOS、Android、Windows、OSX等多种平台。目前已经实现一次编码,到处运行的目的。

Kivy框架主要包含两种文件,一种为Python源码文件,一种为KV文件。Python源码文件用于控制程序的运行逻辑,KV文件用于定义用户界面。

由于Kivy本质上是使用OpenGL进行界面的绘制的,而且通过对Kivy的经典应用「2048 by kivy」进行了简单的运行,Kivy所开发出的应用,在性能上还是可圈可点的,从某种程度上来说,要比使用HTML5/JS的应用在性能以及稳定性上,要好很多。

Installing Dependencies

To install Kivy’s dependencies, follow the guide below for your platform. You might also need these packages for the RST and lexing components:

sudo pip install pygments docutils

For Ubuntu 17.10 and 18.04:

sudo apt-get install python-setuptools python-pygame python-opengl  python-enchant python-dev build-essential python-pip libgl1-mesa-dev  libgles2-mesa-dev zlib1g-dev

Kivy requires a recent version of Cython, so you might need to update your Cython installation.

sudo pip install --upgrade Cython==0.28.2

猜你喜欢

转载自www.cnblogs.com/clemente/p/10541935.html