alpine package py-pip missing
Im trying to install python pip in my alpine using Docker compose file but get the following error.
ERROR: unsatisfiable constraints:
py-pip (missing):
required by: world[py-pip]
ERROR: Service 'web' failed to build: The command '/bin/sh -c apk add py-pip' returned a non-zero code: 1
Solution 1:
Do update
first:
apk add --update py-pip
Or:
apk update
apk add py-pip
Solution 2:
For python3 on alpine edge:
apk add py3-setuptools
Solution 3:
You have to use appropriate pip version depending on Alpine branch:
- Alpine v3.12 or newer, use
apk add --update py3-pip
- Alpine v3.5 - v3.11, use
apk add --update py2-pip
- Alpine v3.3 - v3.4, use
apk add --update py-pip