Skip to content

Commit

Permalink
Update installation-osx.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
akshayaurora committed Feb 24, 2018
1 parent cd592c1 commit 917a1b4
Showing 1 changed file with 63 additions and 74 deletions.
137 changes: 63 additions & 74 deletions doc/sources/installation/installation-osx.rst
Expand Up @@ -5,96 +5,30 @@ Installation on OS X

.. note::

This guide describes multiple ways for setting up Kivy. Installing
with Homebrew and pip is recommended for general use.
This guide describes multiple ways for setting up Kivy.

Using Homebrew with pip
-----------------------

You can install Kivy with Homebrew and pip using the following steps:

1. Install the requirements using `homebrew <http://brew.sh>`_::

$ brew install pkg-config sdl2 sdl2_image sdl2_ttf sdl2_mixer gstreamer

2. Install Cython and Kivy using pip::

$ pip install Cython==0.26.1
$ pip install kivy

- To install the development version, use this in the second step::

$ pip install https://github.com/kivy/kivy/archive/master.zip

Using MacPorts with pip
-----------------------

.. note::

You will have to manually install gstreamer support if you wish to
support video playback in your Kivy App. The latest port documents show the
following `py-gst-python port <https://trac.macports.org/ticket/44813>`_.

You can install Kivy with Macports and pip using the following steps:

1. Install `Macports <https://www.macports.org>`_

2. Install and set Python 3.4 as the default::

$ port install python34
$ port select --set python python34

3. Install and set pip as the default::

$ port install pip-34
$ port select --set pip pip-34

4. Install the requirements using `Macports <https://www.macports.org>`_::

$ port install libsdl2 libsdl2_image libsdl2_ttf libsdl2_mixer

5. Install Cython and Kivy using pip::

$ pip install Cython==0.26.1
$ pip install kivy

- To install the development version, use this in the second step::

$ pip install https://github.com/kivy/kivy/archive/master.zip

Using The Kivy.app
------------------

.. note::
Kivy.app is not available for download at the moment. For details,
see `this <https://github.com/kivy/kivy/issues/5211>`_ issue.

.. note::

This method has only been tested on OS X 10.7 and above (64-bit).
For versions prior to 10.7 or 10.7 32-bit, you have to install the
components yourself. We suggest using
`homebrew <http://brew.sh>`_ to do that.
components yourself.

For OS X 10.7 and later, we provide packages with all dependencies
bundled in a virtual environment, including a Python 3 interpreter for
Kivy3.app. These bundles are primarily used for rapid prototyping,
bundled in a virtual environment, including a Python interpreter for
python3 version. These bundles are primarily used for rapid prototyping,
and currently serve as containers for packaging Kivy apps with Buildozer.

To install Kivy, you must:

1. Navigate to the latest Kivy release at
https://kivy.org/downloads/ and download `Kivy-*-osx-python*.7z`.
2. Extract it using an archive program like `Keka <http://www.kekaosx.com/>`_.
3. Copy the Kivy2.app or Kivy3.app as Kivy.app to /Applications.
Paste the following line in the terminal::

$ sudo mv Kivy2.app /Applications/Kivy.app

4. Create a symlink named `kivy` to easily launch apps with kivy venv::

$ ln -s /Applications/Kivy.app/Contents/Resources/script /usr/local/bin/kivy

https://kivy.org/downloads/ and download `Kivy-*-osx-python*.dmg`.
2. Open the dmg
3. Copy the Kivy.app to /Applications.
4. Create a symlink by running the `makesymlinks` in the window that opens when you open the dmg
5. Examples and all the normal kivy tools are present in the Kivy.app/Contents/Resources/kivy directory.

You should now have a `kivy` script that you can use to launch your kivy app from the terminal.
Expand Down Expand Up @@ -179,3 +113,58 @@ after you have dragged the Kivy.app into the Applications folder. To test if it
of executing a command like the following::

$ kivy yourapplication.py


Using Homebrew with pip
-----------------------

You can install Kivy with Homebrew and pip using the following steps:

1. Install the requirements using `homebrew <http://brew.sh>`_::

$ brew install pkg-config sdl2 sdl2_image sdl2_ttf sdl2_mixer gstreamer

2. Install Cython and Kivy using pip::

$ pip install Cython==0.26.1
$ pip install kivy

- To install the development version, use this in the second step::

$ pip install https://github.com/kivy/kivy/archive/master.zip

Using MacPorts with pip
-----------------------

.. note::

You will have to manually install gstreamer support if you wish to
support video playback in your Kivy App. The latest port documents show the
following `py-gst-python port <https://trac.macports.org/ticket/44813>`_.

You can install Kivy with Macports and pip using the following steps:

1. Install `Macports <https://www.macports.org>`_

2. Install and set Python 3.4 as the default::

$ port install python34
$ port select --set python python34

3. Install and set pip as the default::

$ port install pip-34
$ port select --set pip pip-34

4. Install the requirements using `Macports <https://www.macports.org>`_::

$ port install libsdl2 libsdl2_image libsdl2_ttf libsdl2_mixer

5. Install Cython and Kivy using pip::

$ pip install Cython==0.26.1
$ pip install kivy

- To install the development version, use this in the second step::

$ pip install https://github.com/kivy/kivy/archive/master.zip

0 comments on commit 917a1b4

Please sign in to comment.