问题
I am trying to link my Sphinx documentation with Readthedocs. I can build the documentation locally in my computer but when I try to have Readthedocs automatically generate the documentation I get the following error:
Configuration error:
There is a programmable error in your configuration file:
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/helstrom-quantum-centroid-classifier/envs/latest/lib/python3.7/site-packages/sphinx/config.py", line 368, in eval_config_file
execfile_(filename, namespace)
File "/home/docs/checkouts/readthedocs.org/user_builds/helstrom-quantum-centroid-classifier/envs/latest/lib/python3.7/site-packages/sphinx/util/pycompat.py", line 150, in execfile_
exec_(code, _globals)
File "/home/docs/checkouts/readthedocs.org/user_builds/helstrom-quantum-centroid-classifier/checkouts/latest/docs/conf.py", line 16, in <module>
import sphinx_gallery
ModuleNotFoundError: No module named 'sphinx_gallery'
I have imported sphinx_gallery in my conf.py file as well as added the extension 'sphinx_gallery.gen_gallery'. My conf.py file is located here: https://github.com/leockl/helstrom-quantum-centroid-classifier/blob/master/docs/conf.py
And my Github project is located here: https://github.com/leockl/helstrom-quantum-centroid-classifier
Where have I gone wrong?
来源:https://stackoverflow.com/questions/59834371/build-failed-code-error-for-my-code-in-readthedocs