Search code examples
python-sphinxautodoc

python Sphinx not recognizing modules inside project


I am trying to create autodoc for my python project. the problem is that when I am trying to do make html it's not working...

my project tree looks like -

   - docs
   - EDA_miner

When the EDA miner contains all the code https://pasteboard.co/If8dT8AS.png - project tree

in the sphinx's conf.py I configured like -

   sys.path.insert(0, os.path.abspath('../..'))

but when I am trying to generate using make html I get

   WARNING: autodoc: failed to import module 'app' from module 'EDA_miner'; 
   the following exception was raised:
   No module named 'server'
   WARNING: autodoc: failed to import module 'menus' from module 'EDA_miner'; 
   the following exception was raised:
   No module named 'server'

when I am opening ipython and importing server.py it succeed, how am I doing wrong ?


Solution

  • Make to run make html from within your virtual environment (or just be sure to have all your python dependencies installed)