How to Solve: "ERROR: unsatisfiable constraints (python)"

Gustavo Lima - Jun 3 '20 - - Dev Community

When try to install python2:

apk add --update --no-cache build-base python2-dev python libffi-dev libressl-dev bash git gettext curl
Enter fullscreen mode Exit fullscreen mode

Get this Error:

fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
    python (missing):
      required by: world[python]
Enter fullscreen mode Exit fullscreen mode

To solve change python2-dev python to python3-dev python3, E.g.:

RUN apk add --update --no-cache build-base python3-dev python3 libffi-dev libressl-dev bash git gettext curl \
 && curl -O https://bootstrap.pypa.io/get-pip.py \
 && python3 get-pip.py \
 && pip install --upgrade six awscli awsebcli
Enter fullscreen mode Exit fullscreen mode
. . . .