mediapipe_python_aarch64 icon indicating copy to clipboard operation
mediapipe_python_aarch64 copied to clipboard

Issue importing mediapipe on Raspberry Pi

Open assman opened this issue 4 years ago • 5 comments

Hi Jiuqiang

I followed the instructions and was successfully able to install mediapipe. When I run

ls /home/pi/.local/lib/python3.7/site-packages/mediapipe/python, the solutions folder is present.

However, when I run the interactive python3 shell from my root directory and do a import mediapipe as mp, I get an error as such

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/pi/.local/lib/python3.7/site-packages/mediapipe/__init__.py", line 16, in <module> from mediapipe.python import * File "/home/pi/.local/lib/python3.7/site-packages/mediapipe/python/__init__.py", line 17, in <module> from mediapipe.python._framework_bindings import resource_util ImportError: /home/pi/.local/lib/python3.7/site-packages/mediapipe/python/_framework_bindings.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: __atomic_load_8

assman avatar Dec 23 '20 06:12 assman

I'm experiencing the same problem but for the symbol "_ZN3ruy14Kernel8bitNeonERKNS_16KernelParams8bitILi4ELi2EEE"

lucavella avatar Dec 26 '20 18:12 lucavella

That's strange. I wonder what could be the issue that's causing this. Which OS are you on? I'm on raspbian.

assman avatar Dec 27 '20 14:12 assman

I'm also on Raspbian (or Raspberry Pi OS what it's called now). I found the same issue on the mediapipe repository (https://github.com/google/mediapipe/issues/1346). My issue is related to Tensorflow. Your symbol however is one of the first in the binary. You can check with nm -gCD /home/pi/.local/lib/python3.7/site-packages/mediapipe/python/_framework_bindings.cpython-37m-arm-linux-gnueabihf.so | grep -n "__atomic_load_8". Maybe your issue is related to cmake? I'm not sure.

lucavella avatar Dec 27 '20 15:12 lucavella

I'm also on Raspbian (or Raspberry Pi OS what it's called now). I found the same issue on the mediapipe repository (google/mediapipe#1346). My issue is related to Tensorflow. Your symbol however is one of the first in the binary. You can check with nm -gCD /home/pi/.local/lib/python3.7/site-packages/mediapipe/python/_framework_bindings.cpython-37m-arm-linux-gnueabihf.so | grep -n "__atomic_load_8". Maybe your issue is related to cmake? I'm not sure.

Ok I will check it out thank you

assman avatar Dec 30 '20 07:12 assman

Oh I had this problem with atomic, too, and found that building Bazel using the guide and scripts in here, then coming back and running the mediapipe installation fixed it.

vbartle avatar Apr 22 '21 01:04 vbartle