Search code examples
python-sphinxread-the-docs

How do I tell readthedocs which requirements file to load ?


My readthedocs.org build just started failing ... I am not sure why exactly and not particularly adept at Sphynx. I don't understand why it's attempting to build things for requirements files outside of the docs directory or why it can't find this version of Django suddenly (or why it even needs to).

failing message

Collecting Django==2.0.3 (from -r /home/docs/checkouts/readthedocs.org/user_builds/django-hitcount/checkouts/latest/example_project/requirements.txt (line 1))
  Could not find a version that satisfies the requirement Django==2.0.3 (from -r /home/docs/checkouts/readthedocs.org/user_builds/django-hitcount/checkouts/latest/example_project/requirements.txt (line 1)) (from versions: 1.1.3, ...1.11.11)
No matching distribution found for Django==2.0.3 (from -r /home/docs/checkouts/readthedocs.org/user_builds/django-hitcount/checkouts/latest/example_project/requirements.txt (line 1))

repo

This is for: https://github.com/thornomad/django-hitcount

If you would like to see the ways I have messed this up! Thanks


Solution

  • According to the log file, RTD is parsing your requirements.txt at the root of your project, which in turn calls three other requirements.txt files and fails at the one in latest/example_project/requirements.txt (which is configured to your master branch). You can configure which requirements.txt file that RTD should use in your project's admin.

    Give that a try first, and report back.

    Else you might have a dependency version conflict amongts your requirements.txt files.