Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot import mediapipe - TypeError: 'numpy._DTypeMeta' object is not subscriptable

The install is successful. I receive this error when trying to import.

TypeError: 'numpy._DTypeMeta' object is not subscriptable

enter image description here

I have tried higher and lower versions of numpy (1.22.0,1.23.0,1.24.0,1.25.0,1.25.2). I installed mediapipe via pypi as well as a downloaded whl ( mediapipe-0.10.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl) from pypi

Versions

numpy                        1.21.5
mediapipe                    0.10.3

Python 3.10.6

These questions are similar but not the answer.

Importing xarray raises not subscriptable issue

Cannot import mediapipe in Jupyter notebook

How to prevent error message when importing import cv2?

like image 947
Climbs_lika_Spyder Avatar asked Oct 27 '25 09:10

Climbs_lika_Spyder


1 Answers

I had this error while importing CV2. For this, use 1.20.0 version of numpy.

pip install numpy==1.20.0
like image 68
Sijin John Avatar answered Oct 29 '25 00:10

Sijin John



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!