ammaraskar / sphinx-action

Github action that builds docs using sphinx and places errors inline
Apache License 2.0
194 stars 116 forks source link

Error: 'libtk8.6.so: cannot open shared object file: No such file or directory' when building documentation from files which contain tkinter #41

Open panos23kar opened 2 years ago

panos23kar commented 2 years ago

I get the warning:

WARNING: autodoc: failed to import module 'xxxxx' from module 'src.xxxx'; the following exception was raised: libtk8.6.so: cannot open shared object file: No such file or directory link

I try to generate documentation from docstrings using the extensions = ['sphinx.ext.autodoc',] in the conf.py These modules import tkinter which seems to trigger the above mentioned warnings.

It does not raise an error but the documetantion is not built in index.rst

People say: All you need to do is to install the tkinter package I have tried to do so both for the requirements.txt and sudo apt-get install tk

panos23kar commented 2 years ago

_autodoc_mockimports was proper workaround in my case