cgtinker / BlendArMocap

realtime motion tracking in blender using mediapipe and rigify
GNU General Public License v3.0
929 stars 112 forks source link

Error when using Mediapipe: numpy.core.multiarray failed to import #185

Open gj1342 opened 2 months ago

gj1342 commented 2 months ago

Describe the bug Python: Traceback (most recent call last): File "", line 1232, in _handle_fromlist File "", line 241, in _call_with_frames_removed File "C:\Users\ACER\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\BlendArMocap\src\cgt_mediapipe\cgt_mp_core\cv_stream.py", line 4, in import cv2 File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\python\cv2__init.py", line 181, in bootstrap() File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\python\cv2\init.py", line 153, in bootstrap native_module = importlib.import_module("cv2") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\python\Lib\importlib\init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ImportError: numpy.core.multiarray failed to import

To Reproduce Steps to reproduce the behavior:

  1. Go to the sidebar and click BlendAR
  2. Detect Webcam with 0 slot and 4 value Key Step
  3. Target Hands and press start detection

Expected behavior OpenCV will start and detect my hands

Screenshots Always copy the log message from the system console if an error occurs. Do not create screenshots of error messages. If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

WolfgangNS commented 1 month ago

I had the similar issue, only with movie instead of webcam. While I did try some miscellaneous fixes (run as administrator, install opencv-python), ultimately my fix was just to specify the file path. Easy as that.

image

artistmatej commented 1 week ago

I deleted numpy version 2.x and it started to work (I think numpy version 1.x should be installed).