mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

Can't `pip install mediapipe' on Docker alpine linux

Open Dekwin opened this issue 1 year ago • 4 comments

System information (Please provide as much relevant information as possible)

  • OS Platform and Distribution: Docker, image python:3.8-alpine
  • Installed using virtualenv? pip? Conda? (if python): pip
  • MediaPipe version: latest
  • OpenCV version (if running on desktop): not installed

Describe the problem:

I tried to install mediapipe inside the alpine python image (python:3.8-alpine), but got an error:

ERROR: Could not find a version that satisfies the requirement mediapipe (from versions: none)
ERROR: No matching distribution found for mediapipe

My Dockerfile looks like:

ARG IMAGE=python:3.8-alpine
FROM ${IMAGE}

RUN pip install mediapipe

But if I use Debian based image (python:3.8) it works normally and it can find a mediapipe package:

ARG IMAGE=python:3.8
FROM ${IMAGE}

RUN pip install mediapipe

Dekwin avatar Sep 07 '22 18:09 Dekwin

Hi @Dekwin, Could you please elaborate the use case w.r.t prefer the docker alpine image. Thank you!

kuaashish avatar Sep 12 '22 09:09 kuaashish

try with python:3.8-slim-buster example

FROM python:3.8-slim-buster COPY . . RUN pip install -r requirements.txt CMD ["python", "main.py"] image

requirements.txt

absl-py==1.2.0 attrs==22.1.0 autopep8==1.7.0 cycler==0.11.0 fonttools==4.37.1 kiwisolver==1.4.4 matplotlib==3.5.3 mediapipe==0.8.11 numpy==1.23.3 opencv-contrib-python==4.6.0.66 opencv-python==4.6.0.66 packaging==21.3 Pillow==9.2.0 protobuf==3.20.1 pycodestyle==2.9.1 pyparsing==3.0.9 python-dateutil==2.8.2 six==1.16.0 toml==0.10.2

DanielSarmiento04 avatar Sep 12 '22 19:09 DanielSarmiento04

Please note that, using slim python images will result in problems with opencv (https://github.com/google/mediapipe/issues/3661) as they require additional dependencies.

For the issue here, it seems mediapipe only provides manylinux wheels, that are not supported on alpine systems.

gentnm avatar Sep 13 '22 06:09 gentnm

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

google-ml-butler[bot] avatar Sep 20 '22 08:09 google-ml-butler[bot]

Closing as stale. Please reopen if you'd like to work on this further.

google-ml-butler[bot] avatar Sep 27 '22 08:09 google-ml-butler[bot]

Are you satisfied with the resolution of your issue? Yes No

google-ml-butler[bot] avatar Sep 27 '22 08:09 google-ml-butler[bot]