Trying to install python-dev on the image python:3.7-alpine3.12:
/ # apk add --no-cache python-dev
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-dev (missing):
required by: world[python-dev]
Same on python:3.7-alpine3.11:
/ # apk add --no-cache python-dev
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/3) Installing pkgconf (1.6.3-r0)
(2/3) Installing python2 (2.7.18-r0)
(3/3) Installing python2-dev (2.7.18-r0)
Executing busybox-1.31.1-r9.trigger
OK: 61 MiB in 37 packages
There isn't a python-dev in the apk repo's https://pkgs.alpinelinux.org/packages?name=python-dev&branch=v3.12
You'd want python3-dev https://pkgs.alpinelinux.org/packages?name=python3-dev&branch=v3.12
Really, you don't want either of those packages inside any images maintained here -- these images contain Python built from source, while those packages will pull in Alpine's Python, so you'll have two different Python installations installed in your image.
Most helpful comment
There isn't a
python-devin the apk repo's https://pkgs.alpinelinux.org/packages?name=python-dev&branch=v3.12You'd want
python3-devhttps://pkgs.alpinelinux.org/packages?name=python3-dev&branch=v3.12