0

While getting the documentation of a python repository right, I stumpled upon the issue that the package requirement shapely cannot be install on ReadTheDocs (RTD).

The log says:

Searching for shapely
Reading https://pypi.python.org/simple/shapely/
Best match: Shapely 1.6a1
Downloading https://pypi.python.org/packages/83/3b/99d5d0e266c3bf5f361c76ff046a539eaf96a4e9ca1beaef5121dcaf5cdc/Shapely-1.6a1.tar.gz#md5=a2efe87371d8186f5cbeadc0c153c546
Processing Shapely-1.6a1.tar.gz
Writing /tmp/easy_install-7zplo9iy/Shapely-1.6a1/setup.cfg
Running Shapely-1.6a1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7zplo9iy/Shapely-1.6a1/egg-dist-tmp-t5eb3ob8
Failed `CDLL(libgeos_c.so.1)`
Failed `CDLL(libgeos_c.so)`
error: Could not find library geos_c or load any of its variants ['libgeos_c.so.1', 'libgeos_c.so']

The actual problem is that libgeos is missing on RTD which is required to install shapely. Usually, you install libgeos by sudo apt-get install libgeos-dev. This does not work on RTD.

Does someone has any clue on that? In particular, I'm looking for a solution how to tell RTD to install additional system packages. I'm curious if this is possible at all.

Dom
  • 1,687
  • 6
  • 27
  • 37
gplssm
  • 129
  • 1
  • 7

1 Answers1

1

RTD does not support installing additional c libs as stated in their FAQs, there's a discussion about this issue on git. As written in the FAQ, you can only "mock out" these libs to avoid import errors.

nesnoj
  • 76
  • 4
  • Another article on this can be found [here](http://blog.rtwilson.com/how-to-make-your-sphinx-documentation-compile-with-readthedocs-when-youre-using-numpy-and-scipy/). – nesnoj Jan 13 '17 at 12:20
  • See @nesnoj 's [link](http://blog.rtwilson.com/how-to-make-your-sphinx-documentation-compile-with-readthedocs-when-youre-using-numpy-and-scipy/) on how to mock out libs. Thus, I accept the answer. Thanks! – gplssm Jul 14 '17 at 20:15