Understand and Install Kivy
To learn more about the concepts in this lesson, check out:
00:00 Understanding and Installing Kivy. Kivy was first released in early 2011. This cross-platform Python framework can be deployed to Windows, Mac, and Linux.
00:13 It supports multitouch events in addition to regular keyboard and mouse inputs. Kivy even supports GPU acceleration of its graphics since they’re built using OpenGL ES2. The project uses the MIT license, so you can use it for free and commercial software.
00:31 When you create an application with Kivy, you are creating a natural user interface, or NUI. The idea behind this is that the user can easily learn how to use your software with little to no instruction.
00:43 Kivy does not attempt to use native controls or widgets. All of its widgets are custom drawn. This means that Kivy applications will look the same across all platforms.
00:53 However, it also means that your app’s look and feel will differ from your user’s native applications. This can be a benefit or a drawback, depending on your audience.
01:05 This course was created using Python 3.10 and Kivy 2.1.0. Kivy has many dependencies, so it’s recommended that you install it into a Python virtual environment.
01:20 If you’ve never used a Python virtual environment before, then check out Python Virtual Environments: A Primer to get you up to speed. Here’s how you can create a Python virtual environment.
01:35
This will copy your python3
executable into folder named venv
and add a few other subfolders to that directory. To use the virtual environment, you need to activate it on macOS and Linux.
01:48 You can do that by executing the command seen on-screen.
01:57
The command for Windows is similar, but the location of the activate script is inside of the Scripts
folder instead of bin
.
02:10
Now that you have an activated virtual environment, you can use pip
to install Kivy.
02:23 If you run into any issues installing Kivy on your platform, then see the Kivy download page for additional instructions. In the next section of the course, you’ll get started with using Kivy.
Become a Member to join the conversation.