我在带有Cheetah的
Windows系统上安装了
Python 2.7.当我尝试将cheetah.template对象与.tmpl文件一起使用时,下面是我得到的错误.
from Cheetah.Template import Template t = Template(file='home.tmpl') C:\wamp\bin\Python27\lib\site-packages\Cheetah\Compiler.py:1509: UserWarning: You don't have the C version of NameMapper installed! I'm disabling Cheetah's us eStackFrames option as it is painfully slow with the Python version of NameMappe r. You should get a copy of Cheetah with the compiled C version of NameMapper. "\nYou don't have the C version of NameMapper installed! " from Cheetah.Template import Template t = Template(file='home.tmpl') print t Traceback (most recent call last): File "<stdin>",line 1,in <module> File "C:\wamp\bin\Python27\lib\site-packages\Cheetah\Template.py",line 1005,in __str__ rc = getattr(self,mainMethName)() File "_wamp_www_b121pyraw_b121pycheetah_home_tmpl.py",line 89,in respond File "C:\wamp\bin\Python27\lib\site-packages\Cheetah\NameMapper.py",line 246,in valueFromSearchList _raiseNotFoundException(key,searchList) File "C:\wamp\bin\Python27\lib\site-packages\Cheetah\NameMapper.py",line 167,in _raiseNotFoundException raise NotFound(excString) Cheetah.NameMapper.NotFound: cannot find 'firstdivcontents'
我为python 2.7搜索了_namemapper.pyd,但我没有得到.我发现该文件只有2.6.
我是否必须降级到python 2.6,或者是否有任何其他方法来安装它.
还有如何安装_namemapper.pyd来使用python,如果有的话我会找到它?