Hand Tracking Mediapipe tutorial on rPi4

I have installed the Hand Tracking code with mediapipe and all dependencies as per your instructions on

but got this inscrutable error, in case you can help:

pi@raspberrypi:~/Desktop $ python3 Pose.py
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
Traceback (most recent call last):
File “Pose.py”, line 2, in
import mediapipe as mp
File “/usr/local/lib/python3.7/dist-packages/mediapipe/init.py”, line 17, in
import mediapipe.python.solutions as solutions
File “/usr/local/lib/python3.7/dist-packages/mediapipe/python/solutions/init.py”, line 17, in
import mediapipe.python.solutions.drawing_styles
File “/usr/local/lib/python3.7/dist-packages/mediapipe/python/solutions/drawing_styles.py”, line 20, in
from mediapipe.python.solutions.drawing_utils import DrawingSpec
File “/usr/local/lib/python3.7/dist-packages/mediapipe/python/solutions/drawing_utils.py”, line 22, in
import matplotlib.pyplot as plt
File “/usr/local/lib/python3.7/dist-packages/matplotlib/init.py”, line 109, in
from . import _api, _version, cbook, docstring, rcsetup
File “/usr/local/lib/python3.7/dist-packages/matplotlib/rcsetup.py”, line 27, in
from matplotlib.colors import Colormap, is_color_like
File “/usr/local/lib/python3.7/dist-packages/matplotlib/colors.py”, line 56, in
from matplotlib import _api, cbook, scale
File “/usr/local/lib/python3.7/dist-packages/matplotlib/scale.py”, line 23, in
from matplotlib.ticker import (
File “/usr/local/lib/python3.7/dist-packages/matplotlib/ticker.py”, line 136, in
from matplotlib import transforms as mtransforms
File “/usr/local/lib/python3.7/dist-packages/matplotlib/transforms.py”, line 46, in
from matplotlib._path import (
ImportError: numpy.core.multiarray failed to import

2 Likes

Hey Stephen, I think this is your big clue - 0xd < 0xe. ie., you need to update numpy: pip3 install numpy --upgrade

1 Like

Thanks, will try. Looking for a hand tracking solution that might work on Jetson Nano (or rpi4) or other SBC. Would hire a consultant gladly. For user acceptance, I really need 25 fps or better.

2 Likes

If it’s for a commercial application, it might be worth getting in touch with someone like Saphi:

1 Like

Thanks for the lead.

1 Like

No worries :slight_smile:

How many frames per second were you able to get with your Raspberry Pi hand tracker? Suitable for control of cursor movement or a bit too slow?

@Stephen188341 Have you found a solution? if not then I can help you with this.