Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy
 

How to install cocos2d via python pip




cocos2d - a 2D framework for games and multimedia, it belongs to Classifiers:

- Development Status :: 5 - Production/Stable
- Environment :: MacOS X
- Environment :: Win32 (MS Windows)
- Environment :: X11 Applications
- License :: OSI Approved :: BSD License
- Natural Language :: English
- Operating System :: MacOS
- Operating System :: MacOS :: MacOS X
- Operating System :: Microsoft
- Operating System :: Microsoft :: Windows
- Operating System :: POSIX
- Operating System :: POSIX :: Linux
- Topic :: Games/Entertainment
- Topic :: Software Development :: Libraries
- Topic :: Software Development :: Libraries :: Python Modules

When you know about this project and you want to new install cocos2d to support your project or you get trouble as ModuleNotFoundError: No module named "cocos2d" or ImportError: cannot import name "cocos2d" in your project, let follow this tutorial to install cocos2d



Installation:

Step 1: First, ensure you installed pip in your os, to check pip has been installed on your computer

In Windows (CMD):

py -m pip --version

In Unix/macOS:

python3 -m pip --version

Ensure pip, setuptools, and wheel are up to date:

In Windows (CMD):

py -m pip install --upgrade pip setuptools wheel

In Unix/macOS:

python3 -m pip install --upgrade pip setuptools wheel


Optional - If you want to install in virtual environment:

In Windows (CMD):

- Install virtualenv - if you installed it, please ignore

py -m pip install --user virtualenv

- Create a virtual environment

py -m venv test_cocos2d_env

- Active the virtual environment

test_cocos2d_env\Scripts\active

In Unix/macOS:

- Install virtualenv - if you installed it, please ignore

pip3 install virtualenv

- Create a virtual environment

python3 -m venv test_cocos2d_env

- Active the virtual environment

source test_cocos2d_env/bin/active


Step 2: OK, now, let flow below content to start the installation cocos2d

To install cocos2d on Windows(CMD):

py -m pip install cocos2d

To install cocos2d on Unix/macOs:

pip install cocos2d


Step 3: If you want to install a specific cocos2d version, add ==<cocos2d version> to the end command line

Example:

pip install cocos2d==0.3.0


Please see the version list below table:

VersionReleased dateCommand
cocos2d 0.6.92020-11-08T11:38:12Windows:

py -m pip install cocos2d==0.6.9

Unix/macOs:

pip install cocos2d==0.6.9

cocos2d 0.6.82020-02-03T02:09:28Windows:

py -m pip install cocos2d==0.6.8

Unix/macOs:

pip install cocos2d==0.6.8

cocos2d 0.6.72019-09-06T19:03:35Windows:

py -m pip install cocos2d==0.6.7

Unix/macOs:

pip install cocos2d==0.6.7

cocos2d 0.6.62019-08-15T09:17:29Windows:

py -m pip install cocos2d==0.6.6

Unix/macOs:

pip install cocos2d==0.6.6

cocos2d 0.6.52017-08-24T22:56:39Windows:

py -m pip install cocos2d==0.6.5

Unix/macOs:

pip install cocos2d==0.6.5

cocos2d 0.6.42016-06-12T19:37:36Windows:

py -m pip install cocos2d==0.6.4

Unix/macOs:

pip install cocos2d==0.6.4

cocos2d 0.6.32015-04-26T22:06:40Windows:

py -m pip install cocos2d==0.6.3

Unix/macOs:

pip install cocos2d==0.6.3

cocos2d 0.6.22015-04-08T11:22:06Windows:

py -m pip install cocos2d==0.6.2

Unix/macOs:

pip install cocos2d==0.6.2

cocos2d 0.6.02014-03-25T00:30:14Windows:

py -m pip install cocos2d==0.6.0

Unix/macOs:

pip install cocos2d==0.6.0

cocos2d 0.5.52012-08-13T03:00:30Windows:

py -m pip install cocos2d==0.5.5

Unix/macOs:

pip install cocos2d==0.5.5

cocos2d 0.5.02011-10-26T17:08:46Windows:

py -m pip install cocos2d==0.5.0

Unix/macOs:

pip install cocos2d==0.5.0

cocos2d 0.4.02010-09-27T20:27:48Windows:

py -m pip install cocos2d==0.4.0

Unix/macOs:

pip install cocos2d==0.4.0

cocos2d 0.3.02008-09-06T01:32:34Windows:

py -m pip install cocos2d==0.3.0

Unix/macOs:

pip install cocos2d==0.3.0


Step 4: Otherwise, you can install cocos2d from local archives:

Download the distribution file from cocos2d-0.6.9.tar.gz or the specific cocos2d version in the below list of distribution

After that, install by command:

On Windows(CMD):

py -m pip install <path_to_cocos2d_downloaded_file>

On Unix/macOs:

pip install <path_to_cocos2d_downloaded_file>


List distribution:

- cocos2d-0.3.0-py2.5.egg
- cocos2d-0.3.0.tar.gz
- cocos2d-0.4.0.zip
- cocos2d-0.5.0.zip
- cocos2d-0.5.5.zip
- cocos2d-0.6.0.zip
- cocos2d-0.6.2.zip
- cocos2d-0.6.3.zip
- cocos2d-0.6.4.zip
- cocos2d-0.6.5.tar.gz
- cocos2d-0.6.6.tar.gz
- cocos2d-0.6.7.tar.gz
- cocos2d-0.6.8.tar.gz
- cocos2d-0.6.9.tar.gz


Project link:

- Homepage