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


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.


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.

Hi, I am getting the following error too:

make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:216: modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:7904: modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

Ive enter the below command multiple times, and while at first it was progressing… now its just repeating the same error

make -j $(nproc)

Hi @Harry272782 - are you using the correct OS version as recommended during the guide? That might be a good point to start if not.

Historically, computer vision and ML projects have been tricky on Pi, and it may be that certain packages have been updated and become incompatible.

It might be worth seeking out the latest guidance from the maintainer of the mediapipe package.

1 Like