Could not find library geos_c or load any of its variants ['libgeos_c.so.1', 'libgeos_c.so']
using the python:3.5.1 image I am trying to run a container that includes among other things it installs in requirements.txt shapely. When the docker container tries to install shapely I get the above error.
RUN apt-get install libgeos-dev
was something I saw trying to search the issue but that returns unable to locate package libgeos-dev
summary:
expected conditions: including shapely in the requirements.txt file results ins shapely being installed when the docker container is built
actual conditions: An error message is recieved during build Could not find library geos_c or load any of its variants ['libgeos_c.so.1', 'libgeos_c.so']
Steps to reproduce:
use docker-compose to build on
Docker-compose.yml:
app:
build: ${APP_REPO}
Dockerfile:
FROM python:3.5.1-onbuild
Requirements.txt:
shapely
(Simplified to attempt to isolate issues.)
For alpine, just run following Docker command:
RUN apk add --no-cache \
gcc \
libc-dev \
geos-dev \
&& pip install shapely
This will install shapely with all the proper dependencies for geo and C related dependencies for the shapely for alpine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With