2012-03-23 01:22:05 +00:00
.. _installation_linux:
2012-01-12 10:28:22 +00:00
Installation on Linux
=====================
2011-02-01 10:24:24 +00:00
2012-01-12 10:28:22 +00:00
Prerequisites
-------------
2011-03-16 17:19:57 +00:00
2012-01-12 10:28:22 +00:00
Ubuntu (11.10)
~~~~~~~~~~~~~~
2011-03-16 17:19:57 +00:00
2011-02-01 10:24:24 +00:00
::
2011-02-01 10:26:15 +00:00
2011-02-01 10:24:24 +00:00
$ sudo apt-get install python-setuptools python-pygame python-opengl \
python-gst0.10 python-enchant gstreamer0.10-plugins-good cython python-dev \
build-essential libgl1-mesa-dev libgles2-mesa-dev
2012-01-12 10:28:22 +00:00
Fedora (16)
~~~~~~~~~~~
::
$ sudo yum install python-distutils-extra python-enchant freeglut PyOpenGL \
SDL_ttf-devel SDL_mixer-devel pygame pygame-devel Cython khrplatform-devel \
mesa-libGLES mesa-libGLES-devel gstreamer-plugins-good gstreamer \
gstreamer-python mtdev-devel
OpenSuse (12.1)
~~~~~~~~~~~~~~~
::
$ sudo zypper install python-distutils-extra python-pygame python-opengl \
python-gstreamer-0_10 python-enchant gstreamer-0_10-plugins-good \
python-Cython python-devel Mesa-devel
$ zypper install -t pattern devel_C_C++
2012-02-17 15:19:05 +00:00
Mageia (1 and 2(cauldron))
~~~~~~~~~~~~~~~~~~~~~~~~~~
::
$ su
$ urpmi python-setuptools python-pygame python-opengl \
gstreamer0.10-python python-enchant gstreamer0.10-plugins-good \
python-cython lib64python-devel lib64mesagl1-devel lib64mesaegl1-devel \
lib64mesaglesv2_2-devel make gcc
2012-01-12 10:28:22 +00:00
Installation
------------
If you're installing Kivy for the first time, do::
2011-04-12 08:28:01 +00:00
$ sudo easy_install kivy
2011-02-01 10:24:24 +00:00
If you already installed kivy before, you can upgrade it with::
2011-04-12 08:28:01 +00:00
$ sudo easy_install --upgrade kivy
2011-02-01 10:24:24 +00:00
2011-02-03 15:02:23 +00:00
.. _linux-run-app:
Start from Command Line
-----------------------
2011-04-12 08:28:01 +00:00
We are shipping some examples ready-to-run. However, theses examples are packaged inside the package. That's mean, you must known first where easy_install have installed your current kivy package, and go to the example directory::
2011-02-01 10:24:24 +00:00
2011-04-12 08:28:01 +00:00
$ python -c "import pkg_resources; print pkg_resources.resource_filename('kivy', '../share/kivy-examples')"
2011-02-01 10:24:24 +00:00
2011-04-12 08:28:01 +00:00
And you should have a path similar to::
/usr/local/lib/python2.6/dist-packages/Kivy-1.0.4_beta-py2.6-linux-x86_64.egg/share/kivy-examples/
Then you can go to the example directory, and run it::
# launch touchtracer
$ cd <path to kivy-examples>
$ cd demo/touchtracer
$ python main.py
# launch pictures
$ cd <path to kivy-examples>
$ cd demo/pictures
$ python main.py
If you don't know about Unix and symbolic link, you can create a link directly in your home directory, for an easier access. For example:
2012-01-12 10:28:22 +00:00
#. Get the example path from the command line above
#. Paste in your console::
2011-04-12 08:28:01 +00:00
2012-01-12 10:28:22 +00:00
$ ln -s <path to kivy-examples> ~/
2011-04-12 08:28:01 +00:00
2012-01-12 10:28:22 +00:00
#. Then, you can access to kivy-examples directly in your Home directory::
2011-04-12 08:28:01 +00:00
2012-01-12 10:28:22 +00:00
$ cd ~/kivy-examples