- Installation on Linux¶
- Installation components¶
- Installing Python¶
- Ubuntu¶
- Fedora¶
- Source installation Dependencies¶
- Ubuntu¶
- Fedora¶
- Using software packages (PPA etc.)В¶
- Ubuntu / Kubuntu / Xubuntu / Lubuntu (Saucy and above)В¶
- Debian (Jessie or newer)В¶
- Linux Mint¶
- Bodhi Linux¶
- OpenSuSE¶
- Gentoo¶
- Device permissions¶
- Installation on Linux¶
- Using Wheels¶
- Nightly wheel installation¶
- Using Conda¶
- Using software packages¶
- Ubuntu / Kubuntu / Xubuntu / Lubuntu (Saucy and above)¶
- Debian (Jessie or newer)¶
- Linux Mint¶
- Bodhi Linux¶
- OpenSuSE¶
- Gentoo¶
- Manually installing Kivy from source¶
- Common dependencies¶
- Cython¶
- Dependencies with SDL2¶
- Ubuntu example¶
- Fedora example¶
- Installation¶
- Installation on Linux¶
- Installation components¶
- Installing Python¶
- Ubuntu¶
- Fedora¶
- Source installation Dependencies¶
- Using software packages (PPA etc.)¶
- Using software packages (PPA etc.)¶
- Device permissions¶
Installation on Linux¶
To install Kivy on Linux using pip , please follow the main installation guide . Otherwise, continue to the PPA instructions below .
Installation components¶
Following, are additional information linked to from some of the steps in the main pip installation guide , specific to Linux.
Installing Python¶
Python and python-pip must be installed from the package manager:
Ubuntu¶
Fedora¶
You will likely need to do this preliminary step which installs the rpmfusion-free repository unless you have some other 3rd-party repo installed which has the required packages. See rpmfusion.org for complete installation instructions, but only the rpmfusion-free repo is needed for acquiring kivy dependencies (though rpmfusion-nonfree is recommended by rpm fusion installation instructions) as shown in this step.
After you ensure that a 3rd-party repository containing any packages that dnf is otherwise unable to find, continue installing dependencies:
Source installation Dependencies¶
To install Kivy from source, please follow the installation guide until you reach the Kivy install step and then install the dependencies below before continuing. Additionally, if you’d like to be able to use the x11 window backend do:
Ubuntu¶
Fedora¶
Using software packages (PPA etc.)В¶
Ubuntu / Kubuntu / Xubuntu / Lubuntu (Saucy and above)В¶
Add one of the PPAs as you prefer
$ sudo add-apt-repository ppa:kivy-team/kivy
$ sudo add-apt-repository ppa:kivy-team/kivy-daily
$ sudo apt-get update
$ sudo apt-get install python3-kivy
optionally the gallery of Examples — kivy-examples
$ sudo apt-get install kivy-examples
Debian (Jessie or newer)В¶
Add one of the PPAs to your sources.list in apt manually or via Synaptic
Notice: Wheezy is not supported — You’ll need to upgrade to Jessie at least!
Add the GPG key to your apt keyring by executing
sudo apt-key adv —keyserver keyserver.ubuntu.com —recv-keys A863D2D6
apt-key adv —keyserver keyserver.ubuntu.com —recv-keys A863D2D6
Refresh your package list and install python-kivy and/or python3-kivy and optionally the examples found in kivy-examples
Linux Mint¶
Find out on which Ubuntu release your installation is based on, using this overview.
Continue as described for Ubuntu above, depending on which version your installation is based on.
Bodhi Linux¶
Find out which version of the distribution you are running and use the table below to find out on which Ubuntu LTS it is based.
Ubuntu 10.04 LTS aka Lucid (No packages, just manual install)
Ubuntu 12.04 LTS aka Precise
Ubuntu 14.04 LTS aka Trusty
Ubuntu 16.04 LTS aka Xenial
Continue as described for Ubuntu above, depending on which version your installation is based on.
OpenSuSE¶
To install kivy go to http://software.opensuse.org/package/python-Kivy and use the “1 Click Install” for your openSuse version. You might need to make the latest kivy version appear in the list by clicking on “Show unstable packages”. We prefer to use packages by ” devel:languages:python”.
If you would like access to the examples, please select python-Kivy-examples in the upcoming installation wizard.
Gentoo¶
There is a kivy ebuild (kivy stable version)
available USE-flags are:
cairo: Standard flag, let kivy use cairo graphical libraries. camera: Install libraries needed to support camera. doc: Standard flag, will make you build the documentation locally. examples: Standard flag, will give you kivy examples programs. garden: Install garden tool to manage user maintained widgets. gstreamer: Standard flag, kivy will be able to use audio/video streaming libraries. spell: Standard flag, provide enchant to use spelling in kivy apps.
Device permissions¶
When you app starts, Kivy uses Mtdev to scan for available multi-touch devices to use for input. Access to these devices is typically restricted to users or groups with the appropriate permissions.
If you do not have access to these devices, Kivy will log an error or warning specifying these devices, normally something like:
In order to use these devices, you can add your user to a group that has the required permissions. For example, in Ubuntu, you can add the user to the вЂinput’ group:
Note that you need to log out then back in again for these permissions to be applied.
© Copyright 2010, The Kivy Authors Revision 6430e135 .
Источник
Installation on Linux¶
Using Wheels¶
Wheels are precompiled binaries for all linux platforms using the manylinux2010 tag. All you need to do to install kivy using wheels on linux is
Gstreamer is not included, so if you would like to use media playback with kivy, you should install ffpyplayer like so
Make sure to set KIVY_VIDEO=ffpyplayer env variable before running the app. Only Python 3.5+ is supported.
Nightly wheel installation¶
Using the latest development version can be risky and you might encounter issues during development. If you encounter any bugs, please report them.
Snapshot wheels of current Kivy master are created daily on the master branch of kivy repository. They can be found here. To use them, instead of doing python -m pip install kivy we’ll install one of these wheels as follows.
Download the appropriate wheel for your Python version.
Install it with python -m pip install wheel-name where wheel-name is the name of the file.
Kivy examples are separated from the core because of their size. The examples can be installed separately on all Python versions with this single wheel:
Using Conda¶
If you use Anaconda, you can simply install kivy using:
Using software packages¶
For installing distribution relative packages .deb/.rpm/…
Ubuntu / Kubuntu / Xubuntu / Lubuntu (Saucy and above)¶
Add one of the PPAs as you prefer
$ sudo add-apt-repository ppa:kivy-team/kivy
$ sudo add-apt-repository ppa:kivy-team/kivy-daily
$ sudo apt-get update
$ sudo apt-get install python-kivy
Python3 — python3-kivy
$ sudo apt-get install python3-kivy
optionally the gallery of Examples — kivy-examples
$ sudo apt-get install kivy-examples
Debian (Jessie or newer)¶
Add one of the PPAs to your sources.list in apt manually or via Synaptic
Notice: Wheezy is not supported — You’ll need to upgrade to Jessie at least!
Add the GPG key to your apt keyring by executing
sudo apt-key adv —keyserver keyserver.ubuntu.com —recv-keys A863D2D6
apt-key adv —keyserver keyserver.ubuntu.com —recv-keys A863D2D6
Refresh your package list and install python-kivy and/or python3-kivy and optionally the examples found in kivy-examples
Linux Mint¶
Find out on which Ubuntu release your installation is based on, using this overview.
Continue as described for Ubuntu above, depending on which version your installation is based on.
Bodhi Linux¶
Find out which version of the distribution you are running and use the table below to find out on which Ubuntu LTS it is based.
Ubuntu 10.04 LTS aka Lucid (No packages, just manual install)
Ubuntu 12.04 LTS aka Precise
Ubuntu 14.04 LTS aka Trusty
Ubuntu 16.04 LTS aka Xenial
Continue as described for Ubuntu above, depending on which version your installation is based on.
OpenSuSE¶
To install kivy go to http://software.opensuse.org/package/python-Kivy and use the “1 Click Install” for your openSuse version. You might need to make the latest kivy version appear in the list by clicking on “Show unstable packages”. We prefer to use packages by ” devel:languages:python”.
If you would like access to the examples, please select python-Kivy-examples in the upcoming installation wizard.
Gentoo¶
There is a kivy ebuild (kivy stable version)
available USE-flags are:
cairo: Standard flag, let kivy use cairo graphical libraries. camera: Install libraries needed to support camera. doc: Standard flag, will make you build the documentation locally. examples: Standard flag, will give you kivy examples programs. garden: Install garden tool to manage user maintained widgets. gstreamer: Standard flag, kivy will be able to use audio/video streaming libraries. spell: Standard flag, provide enchant to use spelling in kivy apps.
Источник
Manually installing Kivy from source¶
Common dependencies¶
Cython¶
Different versions of Kivy have only been tested up to a certain Cython version. It may or may not work with a later version.
Kivy | Cython |
---|---|
1.9 | 0.21.2 |
1.9.1 | 0.23.1 |
1.10.0 | 0.25.2 |
1.10.1 | 0.28.2 |
1.11.0 | 0.29.9 |
1.11.1 | 0.29.9 |
Dependencies with SDL2¶
Ubuntu example¶
In the following commands replace all occurrences of python with python3 for Python 3.
Note: Depending on your Linux version, you may receive error messages related to the “ffmpeg” package. In this scenario, use “libav-tools ” in place of “ffmpeg ” (above), or use a PPA (as shown below):
Fedora example¶
You will likely need to do this preliminary step which installs the rpmfusion-free repository unless you have some other 3rd-party repo installed which has the required packages. See rpmfusion.org for complete installation instructions, but only the rpmfusion-free repo is needed for acquiring kivy dependencies (though rpmfusion-nonfree is recommended by rpm fusion installation instructions) as shown in this step.
After you ensure that a 3rd-party repository containing any packages that dnf is otherwise unable to find, continue installing dependencies:
Installation¶
After installing dependencies above specific to your distribution, do the following remaining steps. Replace python with python3 for Python 3.
Источник
Installation on Linux¶
To install Kivy on Linux using pip , please follow the main installation guide . Otherwise, continue to the PPA instructions below .
Installation components¶
Following, are additional information linked to from some of the steps in the main pip installation guide , specific to Linux.
Installing Python¶
Python and python-pip must be installed from the package manager:
Ubuntu¶
Fedora¶
You will likely need to do this preliminary step which installs the rpmfusion-free repository unless you have some other 3rd-party repo installed which has the required packages. See rpmfusion.org for complete installation instructions, but only the rpmfusion-free repo is needed for acquiring kivy dependencies (though rpmfusion-nonfree is recommended by rpm fusion installation instructions) as shown in this step.
Download the appropriate wheel for your Python version.
Install it as above but with pip install wheel-name where wheel-name is the name of the file, instead.
After you ensure that a 3rd-party repository containing any packages that dnf is otherwise unable to find, continue installing dependencies:
Source installation Dependencies¶
To install Kivy from source, please follow the installation guide until you reach the Kivy install step and then install the dependencies below before continuing. Additionally, if you’d like to be able to use the x11 window backend do:
Using software packages (PPA etc.)¶
Using software packages (PPA etc.)¶
Ubuntu / Kubuntu / Xubuntu / Lubuntu (Saucy and above) >>>>>> master
Add one of the PPAs as you prefer
$ sudo add-apt-repository ppa:kivy-team/kivy
$ sudo add-apt-repository ppa:kivy-team/kivy-daily
$ sudo apt-get update
$ sudo apt-get install python3-kivy
optionally the gallery of Examples — kivy-examples
$ sudo apt-get install kivy-examples
Add one of the PPAs to your sources.list in apt manually or via Synaptic
Notice: Wheezy is not supported — You’ll need to upgrade to Jessie at least!
Add the GPG key to your apt keyring by executing
sudo apt-key adv —keyserver keyserver.ubuntu.com —recv-keys A863D2D6
apt-key adv —keyserver keyserver.ubuntu.com —recv-keys A863D2D6
Refresh your package list and install python-kivy and/or python3-kivy and optionally the examples found in kivy-examples
Find out on which Ubuntu release your installation is based on, using this overview.
Continue as described for Ubuntu above, depending on which version your installation is based on.
Find out which version of the distribution you are running and use the table below to find out on which Ubuntu LTS it is based.
Ubuntu 10.04 LTS aka Lucid (No packages, just manual install)
Ubuntu 12.04 LTS aka Precise
Ubuntu 14.04 LTS aka Trusty
Ubuntu 16.04 LTS aka Xenial
Continue as described for Ubuntu above, depending on which version your installation is based on.
To install kivy go to http://software.opensuse.org/package/python-Kivy and use the “1 Click Install” for your openSuse version. You might need to make the latest kivy version appear in the list by clicking on “Show unstable packages”. We prefer to use packages by ” devel:languages:python”.
If you would like access to the examples, please select python-Kivy-examples in the upcoming installation wizard.
There is a kivy ebuild (kivy stable version)
available USE-flags are:
cairo: Standard flag, let kivy use cairo graphical libraries. camera: Install libraries needed to support camera. doc: Standard flag, will make you build the documentation locally. examples: Standard flag, will give you kivy examples programs. garden: Install garden tool to manage user maintained widgets. gstreamer: Standard flag, kivy will be able to use audio/video streaming libraries. spell: Standard flag, provide enchant to use spelling in kivy apps.
Device permissions¶
When you app starts, Kivy uses Mtdev to scan for available multi-touch devices to use for input. Access to these devices is typically restricted to users or groups with the appropriate permissions.
If you do not have access to these devices, Kivy will log an error or warning specifying these devices, normally something like:
In order to use these devices, you can add your user to a group that has the required permissions. For example, in Ubuntu, you can add the user to the ‘input’ group:
Note that you need to log out then back in again for these permissions to be applied. >>>>>>> master
Источник