When try to install python2:
apk add --update --no-cache build-base python2-dev python libffi-dev libressl-dev bash git gettext curl
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]
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
Top comments (10)
Nice tutorial, weldone!
Please i have a similar problem but my own case is on postgresql-client. see below:
WARNING: Ignoring dl-cdn.alpinelinux.org/alpine/v3.1... temporary error (try again later)
WARNING: Ignoring dl-cdn.alpinelinux.org/alpine/v3.1... temporary error (try again later)
ERROR: unsatisfiable constraints:
postgresql-client (missing):
required by: world[postgresql-client]
Please, how can you be of help.
Thanks.
apk add --no-cache curl jq python3 py3-pip
Thanks man 😃
thanks man, you saved the day!
Thank you, you solved this non-dev's problem too.
I still need python2 in short term. Is it possible to install python2 in alpine using any other methods?
replacing python-dev with python2-dev should still work. You can try the install by running
apk add python2-dev
inside an alpine:edge containerI didn’t find another method... Sorry.
Hey bro, excellent, I solved my issue in my CI
Thanks
Great! :D