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.12k stars 5.12k forks source link

No module named 'mediapipe.tasks' #4656

Closed how2051 closed 1 year ago

how2051 commented 1 year ago

Have I written custom code (as opposed to using a stock example script provided in MediaPipe)

None

OS Platform and Distribution

Linux Ubuntu 2004

MediaPipe Tasks SDK version

0.8.9.1

Task name (e.g. Image classification, Gesture recognition etc.)

Gesture recognition

Programming Language and version (e.g. C++, Python, Java)

Python

Describe the actual behavior

when I run the demo code provided by mediapipe on my local device, some error occur:

Traceback (most recent call last):
  File "demo.py", line 3, in <module>
    from mediapipe.tasks import python
ModuleNotFoundError: No module named 'mediapipe.tasks'

Describe the expected behaviour

It should work as the same as the website:
https://colab.research.google.com/github/googlesamples/mediapipe/blob/main/examples/gesture_recognizer/python/gesture_recognizer.ipynb#scrollTo=gxbHBsF-8Y_l

Standalone code/steps you may have used to try to get what you need

when I try to run my demo.py which copyed from mediapipe's example, it said "No module named mediapipe.tasks"

how can I fix it?

(I already installed mediapipe at versions: 0.8.9.1) (I try to install mediapipe by "pip install -q mediapipe==0.10.0", but it said: ERROR: Could not find a version that satisfies the requirement mediapipe==0.10.0 (from versions: 0.8.9.1) ERROR: No matching distribution found for mediapipe==0.10.0)

so I'm confused now, is it bc my mediapipe version wrong so it cant find mediapipe.tasks? If so, how can I install version 0.10.0. If it's not because my mediapipe version, then how can I fix it?

Plz help, thanks a lot

my pip version is 20.0.2 and my python version is 3.8

I've try to upgrade my mediapipe by:"pip install --upgrade mediapipe" but it said already up-to-date and have no more effect, the output is as below:

Other info / Complete Logs

I'm using Linux Ubuntu 20.04.5 LTS
Develop on NVIDIA Jetson Xavier NX Developer Kit, this is where I run my Ubuntu system
how2051 commented 1 year ago

Here's when I try to upgrade my mediapipe by : "pip install --upgrade mediapipe"

Requirement already up-to-date: mediapipe in /home/pcai/.local/lib/python3.8/site-packages (0.8.9.1)
Requirement already satisfied, skipping upgrade: matplotlib in /usr/lib/python3/dist-packages (from mediapipe) (3.1.2)
Requirement already satisfied, skipping upgrade: numpy in /home/pcai/.local/lib/python3.8/site-packages (from mediapipe) (1.19.3)
Requirement already satisfied, skipping upgrade: protobuf>=3.11.4 in /home/pcai/.local/lib/python3.8/site-packages (from mediapipe) (3.20.1)
Requirement already satisfied, skipping upgrade: opencv-contrib-python in /home/pcai/.local/lib/python3.8/site-packages (from mediapipe) (4.8.0.74)
Requirement already satisfied, skipping upgrade: absl-py in /home/pcai/.local/lib/python3.8/site-packages (from mediapipe) (1.4.0)
Requirement already satisfied, skipping upgrade: attrs>=19.1.0 in /home/pcai/.local/lib/python3.8/site-packages (from mediapipe) (23.1.0)
kuaashish commented 1 year ago

@how2051,

MediaPipe does not offer any official support, library, module build into NVIDIA Jetson as such. there are plugin from the community is quite up-to-date which might help in this context But We don't have a plan to support Jeston and does not provide support in how to use them.

However, We are working towards support of Raspberry Pi and will be part of the upcoming release. Thank you!

github-actions[bot] commented 1 year ago

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

github-actions[bot] commented 1 year ago

This issue was closed due to lack of activity after being marked stale for past 7 days.

google-ml-butler[bot] commented 1 year ago

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