cansik / mediapipe-silicon

Prebuilt Google MediaPipe packages for arm64.
MIT License
77 stars 4 forks source link

Error for installing #3

Closed FereshtehFeiz closed 2 years ago

FereshtehFeiz commented 2 years ago

Hello, I run this pip install mediapipe-silicon I got the below error, could you please help me how to solve it? I have Mac M1 pip 21.2.2
python 3.7.2
ERROR: Could not find a version that satisfies the requirement mediapipe-silicon (from versions: none) ERROR: No matching distribution found for mediapipe-silicon

cansik commented 2 years ago

Hi, the packages are currently just built for python 3.8, 3.9 and 3.10. Please use one of those version or just build it yourself with the build.sh script.

FereshtehFeiz commented 2 years ago

Thank you for replying, I updated python to 3.10.4, but I have the same error!

cansik commented 2 years ago

Could you try to directly install the wheel and send me the error message (full output of pip):

pip install https://github.com/cansik/mediapipe-silicon/releases/download/v0.8.9/mediapipe_silicon-0.8.9-cp310-cp310-macosx_12_0_arm64.whl

What is the version of your MacOS?

FereshtehFeiz commented 2 years ago

I got this: ERROR: mediapipe_silicon-0.8.9-cp310-cp310-macosx_12_0_arm64.whl is not a supported wheel on this platform. The version of MacOS is 12.4

cansik commented 2 years ago

Ah and are you sure you are running python in arm64 mode? Because python 3.7 is not supported on M1 as far as I know (at least through brew). You can check it inside python:

python3 -c "import platform; print(platform.machine())"

It should return arm64.

FereshtehFeiz commented 2 years ago

it returns x86_64, but how I can run python on arm64?

cansik commented 2 years ago

Ok, so you could just install mediapipe from the official repo (using the Intel version):

pip install mediapipe

But to install arm64 python I would recommend brew. And I would suggest to install version 3.9, because in machine learning & computer vision some packages are not 3.10 compatible yet.

brew install python@3.9
FereshtehFeiz commented 2 years ago

The problem is when I run this: bazel run --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/iris_tracking:iris_depth_from_image_desktop I got this error: ./mediapipe/framework/port/opencv_core_inc.h:18:10: fatal error: 'opencv2/core/version.hpp' file not found while the bazel run --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/hello_world:hello_world works and gives me the output. so I checked the MediaPipe issues and I thought it might be incompatibility with MacOS

cansik commented 2 years ago

This seems like a opencv not installed error and has nothing to do with the python package asfaik.

FereshtehFeiz commented 2 years ago

I followed these instructions for installation: https://google.github.io/mediapipe/getting_started/install.html#installing-on-macos

cansik commented 2 years ago

This seems not to be related to mediapipe-silicon, but mediapipe itself. So I am going to close this issue if thats ok?

FereshtehFeiz commented 2 years ago

yes yes, Thank you.

cansik commented 2 years ago

Btw. I have just updated the build script to build v0.8.10 where I fixed the opencv problem. It's necessary to adjust the path to opencv@3 in the WORKPLACE file and set the setup to link it (instead of building it).