問題:You don't have the C version of NameMapper installedjava
sudo vi /usr/lib/python2.7/site-packages/Cheetah/Compiler.pypython
將第1506行起如下代碼註釋掉:app
if not NameMapper.C_VERSION: if not sys.platform.startswith('java'): warnings.warn( "\nYou 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( # "\nYou 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)