Questions tagged [kivy]

Kivy is an open source Python library for rapid development of cross-platform applications equipped with novel user interfaces, such as multi-touch apps.

is a library for the development of multi-touch enabled media-rich applications. The aim is to allow for quick and easy interaction design and rapid prototyping while making your code reusable and deployable.

Kivy is written in Python, based on and supports different input devices such as Mouse, Dual Mouse, TUIO, WiiMote, WM_TOUCH, HIDtouch, Apple's products and so on.

Kivy is actively being developed by a community and free to use. It operates on all major platforms (, , , , , ).

The framework contains all the elements for building an application such as:

  • extensive input support for mouse, keyboard, TUIO, and OS-specific multitouch events,
  • a graphics library using only OpenGL ES 2, and based on Vertex Buffer Object and shaders,
  • a wide range of widgets that support multitouch,
  • an intermediate language Kv used to easily design custom widgets.

Kivy is the evolution of the PyMT project, and it is recommended for new projects.

UPDATE:

Kivy now supports Material Designs (inspired from Google) and is available via KivyMD .


icon Kivy Kivy


The main resource for information is the website. In addition, you can also check the Wikipedia entry for Kivy.

13657 questions
19
votes
9 answers

Cannot import name '_png' from 'matplotlib'

I want to use matplotlib instead kivy_garden.graph. Actually, I tried this code to check if it works for me. I've had some problems with installing matplotlib but I have successfully(or not) done that. When I started the code I got from matplotlib…
WASP-21b
  • 307
  • 1
  • 2
  • 7
19
votes
3 answers

Kivy: Get widgets ids and accessing widgets by unique property

I'm new to Kivy and I have this little demo snippet that demonstrates my problem: from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.lang import Builder class KivyGuiApp(App): def build(self): return…
kilbee
  • 403
  • 1
  • 4
  • 13
19
votes
2 answers

Can't install Kivy: Cython/GCC error

so I tried to install Kivy following the instructions from the official site: $ sudo apt-get install python-setuptools python-pygame python-opengl \ python-gst0.10 python-enchant gstreamer0.10-plugins-good python-dev \ build-essential…
orangesky
  • 305
  • 3
  • 8
18
votes
5 answers

How to deal with Kivy installing error in Python 3.8?

I have installed every necessary code in Python from Kivy, but the last one I need which one is python -m pip install kivy gets me an error like this: ERROR: Dependency for context.pyx not resolved: config.pxi ERROR: Dependency for compiler.pyx not…
Atis
  • 181
  • 1
  • 1
  • 5
18
votes
1 answer

Kivy/Buildozer Import Error - pymssql.so is 64-bit instead of 32-bit

I'm using the 64-bit Kivy/Buildozer VM to build and deploy a Kivy app to Android Lollipop (armeabi-v7a 32-bit arch). The Buildozer build is successful but on execution of the app and import of the pymssql package (used to connect to a remote MS SQL…
darthpaul
  • 211
  • 1
  • 5
18
votes
3 answers

How to downgrade to Python 3.4 from 3.5

I want to install kivy (link here) to use for a project, however, when trying to use pip to install the packages it is dependent upon, I get the following error: Could not find a version that satisfies the requirement kivy.deps.sdl2 (from versions:…
jdanaher
  • 207
  • 1
  • 3
  • 11
18
votes
2 answers

How to set a screen background image in Kivy

I know how to make a color background but i can't seem to find anything useful for setting the image as a background and would be really grateful for any help with my code. Here is my .py file: from kivy.app import App from kivy.uix.screenmanager…
Larisa
  • 781
  • 1
  • 11
  • 27
17
votes
7 answers

Issue setting Kivy to fullscreen

I'm trying to write an application that runs kivy at full screen. But these are my issues: 1) When I run the command: #Config.set('graphics', 'fullscreen', 1) Then kivy appears to go full time, but the window has a lot of black spaces around the…
Pototo
  • 691
  • 1
  • 12
  • 27
17
votes
4 answers

Tab/Enter (and other keystrokes) handling in Kivy's TextInput widgets

I'm writing an app using Kivy framework and I stumbled upon a minor but annoying problem: I don't know how to handle Tab/Enter/Arrow keys in text fields so that pressing either of them would dispatch an event, eg. switch the focus (jump) to another…
minder
  • 2,059
  • 5
  • 24
  • 39
16
votes
6 answers

Kivy, Eclipse and PyDev (also PyPy)

According to this post: https://groups.google.com/forum/?fromgroups#!topic/kivy-users/n7c3thksnzg, it is possible to use Eclipse as an IDE for Kivy through PyDev. However, I didn't understand the instructions. Can anyone please elaborate on how to…
GaiusSensei
  • 1,860
  • 4
  • 25
  • 44
16
votes
3 answers

I get "xcrun: error: SDK "iphonesimulator" cannot be located" when running the toolchain

I am trying to compile a Kivy program onto iOS, but when I run the command to build the Kivy distro I keep getting this error: xcrun: error: SDK "iphonesimulator" cannot be located I have xcode on my computer. What is going on?
user992286
  • 295
  • 1
  • 3
  • 6
16
votes
1 answer

How to change text of a label in the kivy language with python

I was wondering how I could change the text of a label made inside the Kivy language using Python. Like how would I have user input from python be made as the text of a label in kivy. (By the way I have the formatting correct in the actual program…
user2896775
  • 182
  • 1
  • 1
  • 8
16
votes
2 answers

How to display an image using kivy

How do I display an image in my pwd? import kivy from kivy.app import App from kivy.uix.button import Button from kivy.uix.image import Image class MyApp(App): def build(self): return Image('b1.png') MyApp().run()
Rajeev
  • 44,985
  • 76
  • 186
  • 285
16
votes
4 answers

How to center text vertically inside a text input in kv file?

I'm trying to center the text of a TextInput vertically in Kivy. But no solution yet. How can I do a valign for text input in the kv file? Also centering horizontally would be great to know, how to do it. For labels I have checked the text align…
AWolf
  • 8,770
  • 5
  • 33
  • 39
16
votes
8 answers

convert rgba color codes 255,255,255,255 to kivy color codes in 1,1,1,1

In order to specify any color value in kivy we need to specify values from 0 to 1 i.e. color defaults to [1,1,1,1] and can contain values between 0 and 1 , however rgba codes which are readily available for other languages are always specified from…
paarth batra
  • 1,392
  • 4
  • 29
  • 53