To use PostgreSql in python, I need
pip install psycopg2
However, it has a dependency on libpq-dev and python-dev. I wonder how to install dependencies in alpine? Thanks.
Here is the Docker file:
FROM python:2.7-alpine RUN apk add python-dev libpq-dev RUN pip install psycopg2
and output:
Step 3: RUN apk add python-dev libpq-dev ---> Run at 3223b1bf7cde WARNING: Ignore APKINDEX.167438ca.tar.gz: There is no such file or directory WARNING: Ignore APKINDEX.a2e6dac0.tar.gz: There is no such file or ERROR directory: unsatisfactory restrictions: libpq-dev (missing): Required: world [libpq-dev] python-dev (missing): Required: world [python-dev] ERROR: Service 'service' could not be created: command '/ bin / sh -c apk add python-dev libpq-dev 'returned non-zero code: 2
source share