Search code examples
tracpygments

Pygments isn't loaded in trac


I've installed Pygments on a TRAC server, but after restarting the TRAC service, Pygments isn't loaded.

After restarting the TRAC service, the log file looks like this:

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)

With 'pip show pygments' I've verified the Pygments installation, version 2.0.2 is installed in the 'c:\python27\lib\site-packages' folder.

What's going wrong?


Solution

  • You need Trac 1.0.3 or later (preferably 1.0.4) with Pygments 2.x. See #11796. You should install Pygments 1.6 if you are stuck with an earlier version of Trac.