Own Addon documentation using Sphinx

Hi All,

I’m trying to make my own addon documentation using sphinx and the extension autodoc. But it can not import the files with an import bpy:

Note that bpy does not appear in the warning but I checked that the error is because of the import bpy
I understand it happens because bpy is not an instalable pip package. So I tried appending bpy folder (from the Blender Python folder) to the PYTHONPATH but It didn’t work.

Any suggestions?
Thank you!

1 Like

I found this:

And this worked for me.

While this works, it’d be worth looking into running auto-doc from inside Blender, as building Blender as a Python module just to use auto-doc is fairly involved.