[Python] MongoDB/docs: cannot generate HTML documentation

Discussão em 'Python' iniciado por Stack, Fevereiro 16, 2025.

  1. Stack

    Stack Membro Participativo

    I would like to install MongoDB manual, in HTML format, on a standalone computer. This computer is disconnected from the internet.

    The MongoDB/docs project on GitHub, https://github.com/mongodb/docs, offers a solution but I cannot get it to work. The project's README says:

    python2 -m pip install giza
    git clone https://github.com/mongodb/docs.git
    cd docs/
    make html


    I tried installing the most recent version of giza, v0.5.18, circa 2019, in a Python 3.10 virtual environment. When I execute make html, giza throws the error sphinx.make_mode module not found:

    Traceback (most recent call last):
    File "/home/ezhik/pyenvs/py3-giza/bin/giza", line 5, in <module>
    from giza.cmdline import main
    File "/home/ezhik/pyenvs/py3-giza/lib/python3.10/site-packages/giza/cmdline.py", line 19, in <module>
    from giza.config.runtime import RuntimeStateConfig
    File "/home/ezhik/pyenvs/py3-giza/lib/python3.10/site-packages/giza/config/runtime.py", line 25, in <module>
    from giza.config.sphinx_config import available_sphinx_builders
    File "/home/ezhik/pyenvs/py3-giza/lib/python3.10/site-packages/giza/config/sphinx_config.py", line 20, in <module>
    import sphinx.make_mode
    ModuleNotFoundError: No module named 'sphinx.make_mode'


    I tried installing giza, v0.5.18, in a Python 2.7 virtual environment but I get the error cannot meet requirements:

    ERROR: Could not find a version that satisfies the requirement Pygments>=2.12.0 (from jsx-lexer->giza) (from versions: 0.5, 0.5.1, 0.6, 0.7, 0.7.1, 0.8, 0.8.1, 0.9, 0.10, 0.11, 0.11.1, 1.0, 1.1, 1.1.1, 1.2, 1.2.1, 1.2.2, 1.3, 1.3.1, 1.4, 1.5, 1.6rc1, 1.6, 2.0rc1, 2.0, 2.0.1, 2.0.2, 2.1, 2.1.1, 2.1.2, 2.1.3, 2.2.0, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 2.4.2, 2.5.1, 2.5.2)
    ERROR: No matching distribution found for Pygments>=2.12.0 (from jsx-lexer->giza)


    What is the best path forward? Does it make sense to install previous versions of giza in Python 2.7 and hope the dependency issues will go away?

    Continue reading...

Compartilhe esta Página