google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
27.46k stars 5.15k forks source link

"pip install mediapipe" does not work #1466

Closed kim-jason closed 3 years ago

kim-jason commented 3 years ago

System information:

Describe the problem: I've followed all the instructions on how to install mediapipe from the official website but have been unsuccessful. "pip install mediapipe" and "pip3 install mediapipe" unfortunately returns the errors of "ERROR: Could not find a version that satisfies the requirement mediapipe" and "ERROR: No matching distribution found for mediapipe".

I'm trying to run the sample videocamera code for mediapipe poses and my code runs into the error when running the line "mp_drawing = mp.solutions.drawing_utils", as the Terminal returns the error of "AttributeError: module 'mediapipe' has no attribute 'solutions'". I've repeated all the steps found at https://google.github.io/mediapipe/getting_started/python.html and https://google.github.io/mediapipe/getting_started/install but haven't been able to successfully import mediapipe.

The Hello World test with "bazel run --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11 \ mediapipe/examples/desktop/hello_world:hello_world" successfully prints out "Hello World!" in my Terminal.

Is there a way to make the "pip install mediapipe" step to run properly? Thank you.

jiuqiant commented 3 years ago

MediaPipe supports Python 3.6 to 3.8. You have Python 3.9, which is not supported yet. You can install Python 3.8 and run MediaPipe in a venv.

kim-jason commented 3 years ago

Thank you so much for your help! I installed Python 3.7.9 and now MediaPipe works perfectly. I appreciate the quick feedback and quick fix.

mayank6940 commented 3 years ago

i have python 3.8.3 but can't install mediapipe it's shows me /Could not find a version that satisfies the requirement mediapipe/ how can i solve

arifuni commented 3 years ago

i have python 3.8.3 but can't install mediapipe it's shows me /Could not find a version that satisfies the requirement mediapipe/ how can i solve

Try python 3.7.9

mayank6940 commented 3 years ago

@arifuni yeah resolved now

MAYANK816 commented 3 years ago

it is not working with 3.7.9 version in windows please help me with the solutions.

Priyanka-ps1105 commented 3 years ago

Same Issue, I tried to install mediapipe via python version 3.7.9 and 3.7.0 of 64 bit but not working

Flashxyz commented 3 years ago

I have a MacBook Pro mid-2010 model and it is not working I am getting the same error ERROR: Could not find a version that satisfies the requirement mediapipe (from versions: none) ERROR: No matching distribution found for mediapipe

i have python 3.7.9 i tried 3.7.0 i tried 3.9.0 i really need help i have been stuck with this issue for two months and I have a project soon 😓

jiuqiant commented 3 years ago

I have a MacBook Pro mid-2010 model and it is not working I am getting the same error ERROR: Could not find a version that satisfies the requirement mediapipe (from versions: none)

ERROR: No matching distribution found for mediapipe

i have python 3.7.9 i tried 3.7.0 i tried 3.9.0 i really need help i have been stuck with this issue for two months and I have a project soon 😓

As we mentioned in troubleshooting.md, mediapipe python supports macOS 10.15+. Your macbookpro may not meet this system requirement.

CRYPTOOOKID commented 3 years ago

Thank you man. I was stuck on this for few hours now. This worked like a magic :D

yashasviagarawal commented 2 years ago

i have python 3.8.3 but can't install mediapipe it's shows me /Could not find a version that satisfies the requirement mediapipe/ how can i solve

Try python 3.7.9

i have python 3.6.7 bit pip install mediapipe is not working it is showing this...

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

vietanh1104 commented 2 years ago

MediaPipe supports Python 3.6 to 3.8. You have Python 3.9, which is not supported yet. You can install Python 3.8 and run MediaPipe in a venv.

I have already installed py 3.7 but I still can't use "pip install mediapipe"

namhyeop commented 2 years ago

I solved this problem. ERROR: Could not find that statement the requirement mediape (from versions: none) error. It's a mac m1x pro environment.

How to solve 1.Intel python 3.7.8rc1 download 2.State of python the use of 3.7.8rc1 on the shell being used for terminal(i emprasized intel python 3.7.8rc1)

If you want to see how I solved it, check the blog link below. https://hyeophyeop.tistory.com/132 Since it is writtten in Korean, you hate translate it into English

merveozdas718 commented 2 years ago

Hİ, I could set up cvzone and mediapipe in anaconda, but when I import libraries, I still see 'no module named 'mediapipe'' and 'no module named 'cvzone''. Then I installed their libraries, again I tried but they already installed and they aren't installed again. I tried again and it doesn't change. CAn you help me?

caotri0407 commented 2 years ago

Traceback (most recent call last): File "C:/Users/TrisNguyen/PycharmProjects/Pose-HumanEstimationProJect/PoseEstimationMin.py", line 2, in import mediapipe as mp File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe__init.py", line 17, in import mediapipe.python.solutions as solutions File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\python\solutions__init.py", line 17, in import mediapipe.python.solutions.drawing_styles File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\python\solutions\drawing_styles.py", line 20, in from mediapipe.python.solutions.drawing_utils import DrawingSpec File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\python\solutions\drawing_utils.py", line 25, in from mediapipe.framework.formats import detection_pb2 File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\framework\formats\detection_pb2.py", line 16, in from mediapipe.framework.formats import location_data_pb2 as mediapipe_dot_framework_dot_formats_dot_locationdata__pb2 File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\framework\formats\location_data_pb2.py", line 16, in from mediapipe.framework.formats.annotation import rasterization_pb2 as mediapipe_dot_framework_dot_formats_dot_annotation_dot_rasterizationpb2 File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\framework\formats\annotation\rasterization_pb2.py", line 42, in options=None), File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\google\protobuf\descriptor.py", line 560, in new _message.Message._CheckCalledFromGeneratedFile() TypeError: Descriptors cannot not be created directly. If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. If you cannot immediately regenerate your protos, some other possible workarounds are:

  1. Downgrade the protobuf package to 3.20.x or lower.
  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

Pls, help me. Although I tried many versions it is still 1 traceback.

maxstrobel commented 2 years ago

Traceback (most recent call last): File "C:/Users/TrisNguyen/PycharmProjects/Pose-HumanEstimationProJect/PoseEstimationMin.py", line 2, in import mediapipe as mp File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipeinit.py", line 17, in import mediapipe.python.solutions as solutions File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\python\solutionsinit.py", line 17, in import mediapipe.python.solutions.drawing_styles File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\python\solutions\drawing_styles.py", line 20, in from mediapipe.python.solutions.drawing_utils import DrawingSpec File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\python\solutions\drawing_utils.py", line 25, in from mediapipe.framework.formats import detection_pb2 File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\framework\formats\detection_pb2.py", line 16, in from mediapipe.framework.formats import location_data_pb2 as mediapipe_dot_framework_dot_formats_dot_locationdatapb2 File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\framework\formats\location_data_pb2.py", line 16, in from mediapipe.framework.formats.annotation import rasterization_pb2 as mediapipe_dot_framework_dot_formats_dot_annotation_dot_rasterization__pb2 File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\framework\formats\annotation\rasterization_pb2.py", line 42, in options=None), File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\google\protobuf\descriptor.py", line 560, in new _message.Message._CheckCalledFromGeneratedFile() TypeError: Descriptors cannot not be created directly. If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. If you cannot immediately regenerate your protos, some other possible workarounds are:

  1. Downgrade the protobuf package to 3.20.x or lower.
  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

Pls, help me. Although I tried many versions it is still 1 traceback.

Hi @caotri0407 - see also https://github.com/google/mediapipe/issues/3392 / https://github.com/google/mediapipe/issues/3379.

MdNaheed commented 2 years ago

bro did you get it?

merveozdas718 commented 2 years ago

you can use python -m pip install mediapipe --user

caotri0407 commented 2 years ago

Traceback (most recent call last): File "C:/Users/TrisNguyen/PycharmProjects/Pose-HumanEstimationProJect/PoseEstimationMin.py", line 2, in import mediapipe as mp File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipeinit.py", line 17, in import mediapipe.python.solutions as solutions File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\python\solutionsinit.py", line 17, in import mediapipe.python.solutions.drawing_styles File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\python\solutions\drawing_styles.py", line 20, in from mediapipe.python.solutions.drawing_utils import DrawingSpec File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\python\solutions\drawing_utils.py", line 25, in from mediapipe.framework.formats import detection_pb2 File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\framework\formats\detection_pb2.py", line 16, in from mediapipe.framework.formats import location_data_pb2 as mediapipe_dot_framework_dot_formats_dot_locationdatapb2 File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\framework\formats\location_data_pb2.py", line 16, in from mediapipe.framework.formats.annotation import rasterization_pb2 as mediapipe_dot_framework_dot_formats_dot_annotation_dot_rasterization__pb2 File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\mediapipe\framework\formats\annotation\rasterization_pb2.py", line 42, in options=None), File "C:\Users\TrisNguyen\PycharmProjects\Pose-HumanEstimationProJect\venv\lib\site-packages\google\protobuf\descriptor.py", line 560, in new _message.Message._CheckCalledFromGeneratedFile() TypeError: Descriptors cannot not be created directly. If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. If you cannot immediately regenerate your protos, some other possible workarounds are:

  1. Downgrade the protobuf package to 3.20.x or lower.
  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

Pls, help me. Although I tried many versions it is still 1 traceback.

Hi @caotri0407 - see also #3392 / #3379.

Thank you so much for your help. It's worked. I appreciate and respect the quick feedback and quick fix.

caotri0407 commented 2 years ago

bro did you get it?

Yes, I get it. Thank you for care me. But after that I used Jupyter and it's worked so smooth.

ekanpycoderx commented 2 years ago

Thank you so much for your help! I installed Python 3.7.9 and now MediaPipe works perfectly. I appreciate the quick feedback and quick fix.

AfraJamader commented 1 year ago

i have python 3.8.3 but can't install mediapipe it's shows me /Could not find a version that satisfies the requirement mediapipe/ how can i solve

Try python 3.7.9

i tried the 3.7.9 version but it is not working for me

merveozdas718 commented 1 year ago

you can use python -m pip install mediapipe --user.