sphinx-build fail – autodoc can’t import/find module

Autodoc can’t find your modules, because they are not in sys.path.

You have to include the path to your modules in in the sys.path in your conf.py.
Look at the top of your conf.py (just after the import of sys), there is a sys.path.insert() statement, which you can adapt.

By the way: you can use the Makefile created by Sphinx to create your documentation.
Just call

make

to see the options.

If something went wrong before try:

make clean

before running make html.

Leave a Comment