问题:You don't have the C version of NameMapper installed
sudo vi /usr/lib/python2.7/site-packages/Cheetah/Compiler.py
将第1506行起以下代码注释掉:
if not NameMapper.C_VERSION:
if not sys.platform.startswith('java'):
warnings.warn(
"
You don't have the C version of NameMapper installed! "
"I'm disabling Cheetah's useStackFrames option as it is "
"painfully slow with the Python version of NameMapper. "
"You should get a copy of Cheetah with the compiled C version of NameMapper."
self.setSetting('useStackFrames', False)
替换成
if not NameMapper.C_VERSION:
if not sys.platform.startswith('java'):
pass
#warnings.warn(
# "
You don't have the C version of NameMapper installed! "
# "I'm disabling Cheetah's useStackFrames option as it is "
# "painfully slow with the Python version of NameMapper. "
# "You should get a copy of Cheetah with the compiled C version of NameMapper."
# )
self.setSetting('useStackFrames', False)