mediapipe
mediapipe copied to clipboard
Can't `pip install mediapipe' on Docker alpine linux
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
Hi @Dekwin, Could you please elaborate the use case w.r.t prefer the docker alpine image. Thank you!
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"]
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
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.
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.
Closing as stale. Please reopen if you'd like to work on this further.