Skip to main content

Setting Up the Cocos2d Development Environment

Introduction

This document describes how to install the Cocos2d development environment on your computer.

This guide uses Cocos2d v3.15.1 as an example.

Installing Python

  1. After downloading the 64-bit installer for Python 2.7.12 from the official website, run the installer—for example, install it to the path D:\Python27. Right-click "This PC", select "Properties", then "Advanced system settings", and click "Environment Variables". Edit the Path value under System Variables and add D:\Python27.
    image

  2. Open the Command Prompt, type python, and if the prompt information shows Python 2.7.12, the installation was successful.
    image

Installing Cocos

  1. Download version 3.15.1 from the Cocos official website Cocos Engine_Game Development Engine:
    image

  2. After downloading version 3.15.1 from the Cocos website, extract it to a local directory, for example, under D:\cocos315\. In the project directory, there is a setup.py file; click this file.
    image

  3. A command line window will pop up, prompting for Android development environment settings. If you are only configuring the development environment for the UWP platform, you can press Enter directly to skip these three settings.
    image

  4. After completing the above setup, the Cocos environment variables will be configured. Run Command Prompt as an administrator, type cocos, and the Cocos version information will be displayed.