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
I'm not a skylled tech and I'd like to understand what kind of measures it need to be activate in order to solve the problem
How to Reproduce
$ git clone https://github.com/.../some_project
$ cd some_project
$ pip install -r requirements.txt
$ cd docs
$ make html SPHINXOPTS="-D language=de"
$ # open _build/html/index and see bla bla
However, if you're building on RTD, and your project was created prior to October 2020, and you haven't explicitly specified a version of Sphinx to use, RTD will default to sphinx<2.
So, sphinx<2 + docutils-0.18 will be installed, causing the error.
You can pin docutils<0.18, but since Sphinx is already doing that (and will likely become compatible with 0.18 in the future), the solution we instead settled on was to pin a more recent version of Sphinx in our RTD requirements. Please refer to RTD's "Reproducible Builds" page (and specifically the pinning dependencies section) for more information on RTD's recommendations here.
EDIT: One additional note...
If your project pins the version of sphinx using extras_require keyword in your setup.py, and
In RTD you're installing your project via the python keyword of your .readthedocs.yaml config file
Then you can also fix the problem by making sure you set extra_requirements key in your RTD config file.
Reacted by Juan Luis Cano Rodríguez, Manuel Kaufmann and Lorena Bălan
Activity
joshuacwnewton commentedon Oct 27, 2021
We've run into this issue too for several projects. Here's a summary of the problem:
docutils-0.18(which is incompatible with Sphinx at the moment, see Update Sphinx to work with docutils-0.18.x #9777).docutils<0.18, so you can avoid auto-installingdocutils-0.18if your Sphinx installation is up-to-date:sphinx/setup.py
Line 26 in 2be9d6b
sphinx<2.sphinx<2+docutils-0.18will be installed, causing the error.You can pin
docutils<0.18, but since Sphinx is already doing that (and will likely become compatible with 0.18 in the future), the solution we instead settled on was to pin a more recent version of Sphinx in our RTD requirements. Please refer to RTD's "Reproducible Builds" page (and specifically the pinning dependencies section) for more information on RTD's recommendations here.EDIT: One additional note...
sphinxusingextras_requirekeyword in yoursetup.py, andpythonkeyword of your.readthedocs.yamlconfig fileThen you can also fix the problem by making sure you set
extra_requirementskey in your RTD config file.astrojuanlu commentedon Oct 27, 2021
This is an excellent summary, thanks @joshuacwnewton ! I'm going to copy it over to readthedocs/readthedocs.org#8616
astrojuanlu commentedon Oct 27, 2021
In any case, this is an exact duplicate of #9727