首页 > 代码库 > Cheetah使用出错!You don't have the C version of NameMapper installed!

Cheetah使用出错!You don't have the C version of NameMapper installed!

1.问题

/usr/lib/python2.5/site-packages/Cheetah/Compiler.py:1532: UserWarning: 
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.
  "\nYou don‘t have the C version of NameMapper installed! 


2.解决方法

You can download a compiled version of _namemapper here:
http://www.cheetahtemplate.org/download.html

Pick _namemapper.pyd2.4 or _namemapper.pyd2.5 depending on your Python version.
Rename the file to _namemapper.pyd and put it in folder:
PYTHON-PATH\Lib\site-packages\Cheetah