首页 > 解决方案 > ImportError:在 MacOS 上安装 Coral

问题描述

我刚刚购买了一个珊瑚 USB TPU,并按照coral.ai/docs/setup/ 上的说明将其安装在运行Big Sur 11.3 的Mac 上,但是当我运行示例代码时:

python3 examples/classify_image.py \
--model test_data/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite \
--labels test_data/inat_bird_labels.txt \
--input test_data/parrot.jpg

我收到以下错误:

Traceback (most recent call last):
  File "/Users/user/scripts/python scripts/coral/pycoral/examples/classify_image.py", line 40, in <module>
    from pycoral.utils.edgetpu import make_interpreter
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pycoral/utils/edgetpu.py", line 24, in <module>
    from pycoral.pybind._pywrap_coral import GetRuntimeVersion as get_runtime_version
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pycoral/pybind/_pywrap_coral.cpython-39-darwin.so, 2): Library not loaded: @rpath/libedgetpu.1.dylib
  Referenced from: /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pycoral/pybind/_pywrap_coral.cpython-39-darwin.so
  Reason: image not found

有没有正确安装的东西?

标签: python-3.xgoogle-coral

解决方案


推荐阅读