You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
no theme named 'python-docs-theme' found (missing theme.conf?) #45
after installing this theme in virtual environment I've got "Theme error".
I do see "missing theme.conf" in the folder "venv/lib/python3.7/site-packages/python_docs_theme" but "make html" produces an error.
How can this error be fixed?
Hmm, i also got this error, after looking around for a while, finally found it: conf.py for your sphinx project should contain something like: extensions = [ ....., 'python_docs_theme', ]
and further on: html_theme = 'python_docs_theme'
Pay special attention to the _ (underscore); don't use - (minus sign).
Works like a charm.
Grtx,
Ben
Reacted by Fei Yang, Sophia Lawal and Valeria Barra
I can confirm the issue as described above, for Python 3.8.2 on macOS with Sphinx 3.1.2, and also that it went away after adding 'python_docs_theme' to extensions.
I think the installation instructions on the README page should be updated accordingly (unless someone volunteers to find out why exactly it works without adding 'python_docs_theme' to extensions for the Python 3 docs).
I have created PR #48 to address this issue. Afterwards, I saw there is already PR #32 that addresses this similarly, but needs to be rebased. Let me know how to proceed there.
Setting the html_theme = "python_docs_theme" tries to import the package python_docs_theme as a plugin which obviously works. Similarly, html_theme = "python-docs-theme" tries to import the package python-docs-theme as a plugin which obviously does not work.
I also had this issue with identical symptoms as the OP. The cause in my case was that Sphinx wasn't installed in the virtualenv that was activated. The Sphinx makefile would still run, but it was finding Sphinx outside of the virtualenv so the errors were very misleading.
Fix was simply
pip install sphinx
and then adding it to my requirements.txt so that readthedocs would work as expected.
The Sphinx makefile would still run, but it was finding Sphinx outside of the virtualenv so the errors were very misleading.
- @ scott-griffiths at #45 (comment)
thanks a lot.
for me, the issue was that i had not activated the .venv.
i am using pdm build system, and so-far, i never needed to activate that due to it
but yeah, for sphinx-build used by make html, source .venv/Scripts/activate fixed it :)
looks like it's time to explore direnv or the like :D
orrr, better yet, change the makefile lol 😄. no need to activate it again 😆
- SPHINXBUILD ?= sphinx-build+ SPHINXBUILD ?= pdm run sphinx-build
Activity
beijersb commentedon Jun 11, 2020
Hmm, i also got this error, after looking around for a while, finally found it:
conf.pyfor your sphinx project should contain something like:extensions = [ ....., 'python_docs_theme', ]and further on:
html_theme = 'python_docs_theme'Pay special attention to the _ (underscore); don't use - (minus sign).
Works like a charm.
Grtx,
Ben
JulienPalard commentedon Jun 15, 2020
Interestingly, cpython just has
html_theme = 'python_docs_theme', and we're not having the issue.andy-maier commentedon Jul 21, 2020
I can confirm the issue as described above, for Python 3.8.2 on macOS with Sphinx 3.1.2, and also that it went away after adding
'python_docs_theme'toextensions.I think the installation instructions on the README page should be updated accordingly (unless someone volunteers to find out why exactly it works without adding
'python_docs_theme'toextensionsfor the Python 3 docs).Added info about updating the conf.py file to README file
andy-maier commentedon Jul 21, 2020
I have created PR #48 to address this issue. Afterwards, I saw there is already PR #32 that addresses this similarly, but needs to be rebased. Let me know how to proceed there.
JulienPalard commentedon Jul 23, 2020
I checked the following steps on Debian:
Sphinx==3.1.2 python-docs-theme==2020.1sphinx-quickstartmake htmlfirefox _build/html/index.htmland it worked as expected, no need to edit
extensionsfor me.Can someone having the issue try this to compare?
Mariatta commentedon Sep 14, 2020
For the core sprint repo, we only added the
html_theme='python_docs_theme', using Python 3.8.3 and sphinx 3.2.1.I think it's not needed to add it to
extensions.pradyunsg commentedon May 1, 2021
I can confirm that the issue here is the
-vs_.Setting the
html_theme = "python_docs_theme"tries to import the packagepython_docs_themeas a plugin which obviously works. Similarly,html_theme = "python-docs-theme"tries to import the packagepython-docs-themeas a plugin which obviously does not work.This can be closed IMO.
JulienPalard commentedon May 1, 2021
Thanks @pradyunsg, and I agree, I'm closing this.
scott-griffiths commentedon Sep 1, 2022
I also had this issue with identical symptoms as the OP. The cause in my case was that Sphinx wasn't installed in the virtualenv that was activated. The Sphinx makefile would still run, but it was finding Sphinx outside of the virtualenv so the errors were very misleading.
Fix was simply
pip install sphinxand then adding it to my
requirements.txtso that readthedocs would work as expected.peterjpxie commentedon Jan 24, 2023
@scott-griffiths 's fix works for me. Thanks!
My environment:
Ubuntu 22.04, it comes with sphinx pre-installed at system path /usr/bin/sphinx-build.
The same issue happens if I follow https://www.sphinx-doc.org/en/master/usage/installation.html#linux to install on Ubuntu16.04:
goyalyashpal commentedon Mar 28, 2024
thanks a lot.
for me, the issue was that i had not activated the
.venv.i am using
pdmbuild system, and so-far, i never needed to activate that due to itbut yeah, for
sphinx-buildused bymake html,source .venv/Scripts/activatefixed it :)looks like it's time to explore
direnvor the like :Dorrr, better yet, change the makefile lol 😄. no need to activate it again 😆