kantancoding/microservices-python

ERROR: failed to solve: process "/bin/sh -c pip install --no-cache-dir --requirement /app/requirements.txt" did not complete successfully: exit code: 1

Opened this issue · 4 comments

I followed along till writing the Dockerfile and did the pip3 freeze but then when i ran the script, mysqlclient is creating problems and is interrupting the build process. I faced a similar issue during the initial stage too when you once did the localhost print statement but then, everything after that step went smooth until this error. Im using MacBook Air M1 (2020). Requesting your help. Thanks in advance!

You can fix the error by including pkg-config when installing
image

Adding --fix-missing to this command and retrying multiple times also works on MacOS

RUN apt-get update \ && apt-get install -y --no-install-recommends --no-install-suggests \ build-essential default-libmysqlclient-dev \ && apt-get -y --fix-missing install \ && pip install --no-cache-dir --upgrade pip

You can fix the error by including pkg-config when installing image

worked for me.

RUN apt-get update \ && apt-get install -y --no-install-recommends --no-install-suggests \ python3-dev default-libmysqlclient-dev build-essential pkg-config \ && pip install --no-cache-dir --upgrade pip