How to force Sphinx to use Python 3.x interpreter

后端 未结 9 910
遇见更好的自我
遇见更好的自我 2020-12-05 14:56

I try to create documentation for a project written with Python 3.x. Sphinx is the tool I want to use and, according to the official site, its last version 1.1.2 is

9条回答
  •  借酒劲吻你
    2020-12-05 14:58

    Installation: Install sphinx with pip for python3(pip3 like that).

        pip3 install -U sphinx
    

    Building: Makefile(linux/Mac) changes.

        SPHINXBUILD   = python -msphinx
    

    In above line in Makefile change python to python3(or python3.x) like

       SPHINXBUILD   = python3 -msphinx
    

    if default python is pointing to 2.x version python.

提交回复
热议问题