You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I get following error when running the command
~/workspace/coral/pycoral master* ❯ 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/siyalrach/workspace/coral/pycoral/examples/classify_image.py", line 139, in <module>
main()
File "/Users/siyalrach/workspace/coral/pycoral/examples/classify_image.py", line 87, in main
interpreter = make_interpreter(*args.model.split("@"))
File "/Users/siyalrach/.pyenv/versions/3.9.16/lib/python3.9/site-packages/pycoral-2.0.0-py3.9.egg/pycoral2/utils/edgetpu.py", line 87, in make_interpreter
File "/Users/siyalrach/.pyenv/versions/3.9.16/lib/python3.9/site-packages/pycoral-2.0.0-py3.9.egg/pycoral2/utils/edgetpu.py", line 52, in load_edgetpu_delegate
File "/Users/siyalrach/.pyenv/versions/3.9.16/lib/python3.9/site-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
delegate = Delegate(library, options)
File "/Users/siyalrach/.pyenv/versions/3.9.16/lib/python3.9/site-packages/tflite_runtime/interpreter.py", line 89, in __init__
self._library = ctypes.pydll.LoadLibrary(library)
File "/Users/siyalrach/.pyenv/versions/3.9.16/lib/python3.9/ctypes/__init__.py", line 452, in LoadLibrary
return self._dlltype(name)
File "/Users/siyalrach/.pyenv/versions/3.9.16/lib/python3.9/ctypes/__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(libedgetpu.1.dylib, 0x0006): tried: 'libedgetpu.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibedgetpu.1.dylib' (no such file), '/Users/siyalrach/.pyenv/versions/3.9.16/lib/libedgetpu.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/siyalrach/.pyenv/versions/3.9.16/lib/libedgetpu.1.dylib' (no such file), '/opt/homebrew/lib/libedgetpu.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libedgetpu.1.dylib' (no such file), '/Users/siyalrach/.pyenv/versions/3.9.16/lib/libedgetpu.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/siyalrach/.pyenv/versions/3.9.16/lib/libedgetpu.1.dylib' (no such file), '/opt/homebrew/lib/libedgetpu.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libedgetpu.1.dylib' (no such file), '/usr/lib/libedgetpu.1.dylib' (no such file, not in dyld cache), 'libedgetpu.1.dylib' (no such file)
Exception ignored in: <function Delegate.__del__ at 0x1023a9820>
Traceback (most recent call last):
File "/Users/siyalrach/.pyenv/versions/3.9.16/lib/python3.9/site-packages/tflite_runtime/interpreter.py", line 124, in __del__
if self._library is not None:
AttributeError: 'Delegate' object has no attribute '_library'
I got it working after running the following modification.
When installing Edge TPU runtime it generates a symlink to /usr/local/lib/libedgetpu.1.dylib:
~/workspace/coral/edgetpu_runtime ❯ sudo bash install.sh
...
Using the maximum operating frequency for Coral USB devices.
==> Downloading https://formulae.brew.sh/api/formula.jws.json
#=#=- # #
==> Downloading https://formulae.brew.sh/api/cask.jws.json
Warning: libusb 1.0.26 is already installed and up-to-date.
To reinstall 1.0.26, run:
brew reinstall libusb
Installing Edge TPU runtime library [/usr/local/lib]...
Generating symlink [/usr/local/lib/libedgetpu.1.dylib]...
Which is not in the path, wheretflite_runtime is looking in, after creating symlink ln -s /usr/local/lib/libedgetpu.1.dylib /opt/homebrew/lib/libedgetpu.1.dylib it worked.
Also had to change Image.ANTIALIAS to Image.LANCZOS on line 95 in examples/classify_image.py, since ANTIALIAS was removed in Pillow 10.0.0 and I had version 10.1.0 on my system
Description
I have tried to run following command from the getting started docs on my MacOS Ventura ARM64
But I get following error when running the command
Click to expand!
Issue Type
No response
Operating System
No response
Coral Device
No response
Other Devices
No response
Programming Language
No response
Relevant Log Output
python3 -c 'from pycoral.utils.edgetpu import get_runtime_version; print(get_runtime_version())' BuildLabel(COMPILER=Apple LLVM 13.0.0 (clang-1300.0.29.30),DATE=redacted,TIME=redacted), RuntimeVersion(14)
The text was updated successfully, but these errors were encountered: