QuestionAccepted answer
How do I install python on alpine linux?
Cutaraca
25 Mar 2021, 13:55 UTC
112.5K views1
How do I install python3 and python3-pip on an alpine based image (without using a python image)?
$ apk add --update python3.8 python3-pip
ERROR: unsatisfiable constraints:
python3-pip (missing):
required by: world[python3-pip]
python3.8 (missing):
required by: world[python3.8]
1 answer
Accepted answer · original discussion
Terry Spotts
Permalink27 Mar 2021, 01:55 UTC
This is what I use in a Dockerfile for an alpine image:
# Install python/pip
ENV PYTHONUNBUFFERED=1
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools
2 question comments
Use comments to ask for clarification. Post a solution as an answer.
vhsPermalink
28 Mar 2021, 13:55 UTC
OP specifically asks how to accomplish the task without using a python image.
Tobias FeilPermalink
30 Mar 2021, 01:55 UTC
You're obviously interested in installing python3.8, not just any version of python3. However, none of the answers address this. Has anyone figured out how to install a specific minor version of python3?