Skip to content Skip to sidebar Skip to footer

Sphinx Cannot Find Module But Python Can

Sphinx, the Python documentation generator, does not seem to understand my modules/packages. On make clean && make html, when this code is ran: from statstuff import statis

Solution 1:

Since your modules are in a package called statstuff, I suggest the following:

  1. Add the path to the directory abovestatstuff to sys.path in conf.py:

    sys.path.insert(0, os.path.abspath('..'))
    
  2. Edit the automodule directives. Change

    .. automodule:: probability 
    

    to

    .. automodule:: statstuff.probability
    

    and so on.

Post a Comment for "Sphinx Cannot Find Module But Python Can"