Docker Community Forums

Share and learn in the Docker community.

The command '/bin/sh -c apk add --update py-pip' returned a non-zero code: 1

I"m working through the developer - beginner lessen’s exercise, section 2.3.2. When the following command in the Dockerfile executed,

 # install python and pip
 RUN apk add --update py-pip

I received the following error:
ERROR: unsatisfiable constraints:
py-pip (virtual):
provided by: py2-pip
required by: world[py-pip]
The command ‘/bin/sh -c apk add --update py-pip’ returned a non-zero code: 1

Have I missed anything?


I’m having the same issue, did you find a fix?

Try adding this just above the RUN -->

RUN apk add --update py2-pip

It should install the required dependencies, allowing py-pip to be installed.

What should be added above the line “RUN apk add --update py2-pip” ?