Thursday, 6 October 2011

Installing Cocos2d on Windows

Cocos2d uses Python 2.6. The official python website no longer releases an installer for 2.6.x. Therefore, to install, the easiest way is to get the installer (32 bit) from ActivePython.

Make sure to add Python 2.6 to your system environment variables. If you don't know how to do that, see my blog post here. Now, you can type python2.6 in Powershell/cmd to launch this version. I believe the path that is first in the environment variables string is called by default, so typing python for me will still launch Python 2.7

Get the latest version of cocos2d and pyglet. I have multiple versions of Python installed, so I went with the source distribution for the latter (.zip file).

Both packages are then easily installed by extracting them somewhere, browsing to the folders in Powershell/cmd (type powershell or cmd in the address bar in windows explorer) and typing:

python2.6 install

Test by opening up an instance of python and type:

import cocos

No comments:

Post a Comment