What version of Cocos2d-x?

What version of python are you using?

Did you forget to accept the cocos license agreement?

You can make a new file at: ~/.cocos/local_cfg.json with the contents of:

    "agreement_shown": true

I’m using cocos2dx at my desktop computer and i wanted to install it to my laptop too.I worked but when I try writing cocos commands to cmd it gives an error.Here is the error:
File “C:\Users\user\Desktop\cocos\cocos2d-x-3.16\tools\cocos2d-console\bin/”, line 1044, in
File “C:\Users\user\Desktop\cocos\cocos2d-x-3.16\tools\cocos2d-console\bin/”, line 346, in show_stat_agreement
input_value = raw_input(MultiLanguage.get_string(‘COCOS_AGREEMENT’))
NameError: name ‘raw_input’ is not defined

No I mean .cocos if it is not there create it and the file I mentioned above. Are you on MacOS?

I’m using cocos2dx 3.16 and Python 2.7.I don’t know where to accept license agreement.And I can’t find the .cocos directory.Do you mean cocos ?

I was using 3.6 yeah.But I installed 2.7 how can I work it by 2.7 ?

No I’m in Windows.I created the file but I got more errors :
File “D:\cocos\cocos2d-x-3.16\tools\cocos2d-console\bin/”, line 1047, in
if not _check_python_version():
File “D:\cocos\cocos2d-x-3.16\tools\cocos2d-console\bin/”, line 975, in check_python_version
print(MultiLanguage.get_string(‘COCOS_PYTHON_VERSION_TIP_FMT’) % (major_ver, minor_ver))
File “D:\cocos\cocos2d-x-3.16\tools\cocos2d-console\bin\”, line 52, in get_string
fmt = cls.get_instance().get_current_string(key)
File “D:\cocos\cocos2d-x-3.16\tools\cocos2d-console\bin\”, line 46, in get_instance
cls.instance = MultiLanguage()
File “D:\cocos\cocos2d-x-3.16\tools\cocos2d-console\bin\”, line 97, in init
self.cfg_info = json.load(f, encoding=‘utf-8’)
File "C:\Users\ayber\AppData\Local\Programs\Python\Python36\lib\json_init
.py", line 296, in load
return loads(,
File “C:\Users\ayber\AppData\Local\Programs\Python\Python36\lib\encodings\”, line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: ‘charmap’ codec can’t decode byte 0x8f in position 30687: character maps to

I finally did it.Thank you for everything :smiley:

on Windows you need to change your PATH$ variable.

1 Like

Are you sure you are using 2.7?

What is the output of python --version?