Sphinx Read-The-Docs Theme recognised but not "found"

Viewed 3796

I downloaded the read-the-docs theme for sphinx from Github and put it into the _themes folder.

conf.py:

html_theme = "sphinx_rtd_theme"
html_theme_path = ["_themes", ]

However, running "make html" I get this error:

Sphinx v4.1.2 in Verwendung
Lade Übersetzungen [de]…erledigt
loading pickled environment... erledigt
WARNING: sphinx_rtd_theme (< 0.3.0) found. It will not be available since Sphinx-6.0

Theme error:
no theme named 'sphinx_rtd_theme' found (missing theme.conf?)

Somehow Sphinx seems to find the theme and then disregard it. Can someone tell me what is happening and how I can fix it?

2 Answers

Need to install:

pip install sphinx-rtd-theme

I solved it! (not the same as OP, since he did not have the package installed, but maybe it'll be useful for somebody)

If it doesn't work for you, be sure to use underscores in the conf.py file as the package uses normal dashes.

In conf.py it should be like this html_theme = 'sphinx_rtd_theme' not like this html_theme = 'sphinx-rtd-theme'

https://pypi.org/project/sphinx-rtd-theme/

Related