Book Image

Python Game Programming By Example

Book Image

Python Game Programming By Example

Overview of this book

Table of Contents (14 chapters)
Python Game Programming By Example
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Installing cocos2d


In our previous game, we did not use any third-party package since Tkinter was part of the Python standard library. This is not the case with our new game framework, which must be downloaded and installed.

The Python Package Index (also called PyPI) is an official software repository of third-party packages, and thanks to package manager systems, this process becomes very straightforward. The pip is the packaging tool recommendation, and it is already included in the latest Python installations.

You can check whether pip is installed by running pip --version. The output indicates the version of pip and where it is located. This information may vary depending on your Python version and its installation directory:

$ pip --version
pip 6.0.8 from C:\Python34\lib\site-packages (python 3.4)

Since cocos2d is available on the PyPI, you can install it by running the following command:

$ pip install cocos2d

This command downloads and installs not only the cocos2d package but also...