| 1 |
Installation |
| 2 |
============ |
| 3 |
|
| 4 |
pyglet is a pure Python library, with no hard dependencies on other modules. |
| 5 |
No special steps or compilation are required for installation. You can install |
| 6 |
from `on PyPI <https://pypi.python.org/pypi/pyglet>`_ via **pip**. For example: |
| 7 |
|
| 8 |
.. code-block:: sh |
| 9 |
|
| 10 |
pip install --upgrade --user pyglet |
| 11 |
|
| 12 |
You can also clone the repository using **git** and install from source: |
| 13 |
|
| 14 |
.. code-block:: sh |
| 15 |
|
| 16 |
git clone https://github.com/pyglet/pyglet.git |
| 17 |
cd pyglet |
| 18 |
python setup.py install --user |
| 19 |
|
| 20 |
|
| 21 |
In addition, since pyglet is pure Python, you can also just copy the `pyglet` |
| 22 |
subfolder directly into the root of your project without installation into your |
| 23 |
local `site-packages`. |
| 24 |
|
| 25 |
To play video, or a wide selection of compressed audio, pyglet can optionally |
| 26 |
use `FFmpeg <https://www.ffmpeg.org/download.html>`_. |
| 27 |
|
| 28 |
|
| 29 |
Running the examples |
| 30 |
-------------------- |
| 31 |
|
| 32 |
The source code archives include examples. Archive zip files are |
| 33 |
`available on Github <https://github.com/pyglet/pyglet/releases/>`_: |
| 34 |
|
| 35 |
.. code-block:: sh |
| 36 |
|
| 37 |
unzip pyglet-x.x.x.zip |
| 38 |
cd pyglet-x.x.x |
| 39 |
python examples/hello_world.py |
| 40 |
|
| 41 |
|
| 42 |
As mentioned above, you can also clone the repository using Git: |
| 43 |
|
| 44 |
.. code-block:: sh |
| 45 |
|
| 46 |
git clone https://github.com/pyglet/pyglet.git |
| 47 |
cd pyglet |
| 48 |
python examples/hello_world.py |