我在TRAC服务器上安装了Pygments,但是在重新启动TRAC服务后,没有加载Pygments。
重新启动TRAC服务后,日志文件如下所示:
2015-03-07 20:34:52,496 Trac[loader] DEBUG: Loading trac.mimeview.patch from c:\python27\lib\site-packages
2015-03-07 20:34:52,496 Trac[loader] DEBUG: Loading trac.mimeview.pygments from c:\python27\lib\site-packages
2015-03-07 20:34:52,513 Trac[loader] DEBUG: Skipping "trac.mimeview.pygments = trac.mimeview.pygments [pygments]": ("DistributionNotFound: Pygments>=0.6" not found)
2015-03-07 20:34:52,513 Trac[loader] DEBUG: Loading trac.mimeview.rst from c:\python27\lib\site-packages
2015-03-07 20:34:52,513 Trac[loader] DEBUG: Skipping "trac.mimeview.rst = trac.mimeview.rst [rest]": ("DistributionNotFound: docutils>=0.3" not found)
2015-03-07 20:34:52,513 Trac[loader] DEBUG: Loading trac.mimeview.silvercity from c:\python27\lib\site-packages
2015-03-07 20:34:52,529 Trac[loader] DEBUG: Skipping "trac.mimeview.silvercity = trac.mimeview.silvercity [silvercity]": ("DistributionNotFound: SilverCity>=0.9.4" not found)
2015-03-07 20:34:52,529 Trac[loader] DEBUG: Loading trac.mimeview.txtl from c:\python27\lib\site-packages
2015-03-07 20:34:52,529 Trac[loader] DEBUG: Skipping "trac.mimeview.txtl = trac.mimeview.txtl [textile]": ("DistributionNotFound: textile>=2.0" not found)
使用'pip show pygments'我已经验证了Pygments安装,版本2.0.2安装在'c:\ python27 \ lib \ site-packages'文件夹中。
出了什么问题?
答案 0 :(得分:1)
你需要使用Pygments 2.x的Trac 1.0.3或更高版本(最好是1.0.4)。见#11796。如果您遇到早期版本的Trac,则应安装Pygments 1.6。