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 compatible with Python 3.1+. My OS is Archlinux, a Linux distribution which uses Python 3.2+ as the default Python package.
The installation and configuration is straight forward (easy_install -U Sphinx
then sphinx-quickinstall
) and I was never asked to choose between the 2.x or 3.x Python interpreter. But when I ask Sphinx to create the documentation of my project, my code is analyzed as if I wrote it for Python 2.x.
Is Sphinx ready for Python 3.x? Did I make a mistake?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With