Pygments python module needed to build documentation for json-glib module
json-glib
module fails while building its documentation because pygments
python module is not found, error follows:
Building documentation for json-glib
./json-glib-unused.txt:1: warning: 7 unused declarations. They should be added to json-glib-sections.txt in the appropriate place.
ERROR: Error in gtkdoc helper script:
ERROR: ['gtkdoc-fixxref', '--module=json-glib', '--module-dir=html', '--html-dir=/home/nelson/jhbuild/install/share/gtk-doc/html', '--extra-dir=/home/nelson/jhbuild/install/share/gtk-doc/html/glib', '--extra-dir=/home/nelson/jhbuild/install/share/gtk-doc/html/gobject', '--extra-dir=/home/nelson/jhbuild/install/share/gtk-doc/html/gio'] failed with status 1
Traceback (most recent call last):
File "/home/nelson/jhbuild/install/bin/gtkdoc-fixxref", line 28, in <module>
from gtkdoc import common, config, fixxref
File "/home/nelson/jhbuild/install/share/gtk-doc/python/gtkdoc/fixxref.py", line 28, in <module>
from . import common, highlight
File "/home/nelson/jhbuild/install/share/gtk-doc/python/gtkdoc/highlight.py", line 27, in <module>
from pygments import highlight
ModuleNotFoundError: No module named 'pygments'
Problem was solved by installing python3 pygments module system wide, as follows:
sudo dnf install python3-pygments
Please note that, actually is the gtk-doc
module which needs to pull in the pygments
dependency, as json-glib
is just calling a script generated by gtk-doc.
Edited by Nelson Ben