将c++ 封装成lua调用时,显示一下错误:
PYTHON_BIN not defined, use current python.
generating userconf.ini...
Generating bindings for cocos2dx_TextLoader...
Traceback (most recent call last):
File "/Applications/Cocos/frameworks/cocos2d-x-3.5/tools/bindings-generator/generator.py", line 16, in <module>
from Cheetah.Template import Template
ImportError: No module named Cheetah.Template
---------------------------------
Generating lua bindings fails.
从错误提示就知道缺少cheetah库,所以先从http://pythonhosted.org//Cheetah/这个地址下载库,打开终端,cd 到下载文件夹的目录,
输入命令:sudo python setup.py install即可
时间: 2024-12-19 08:50:46