Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Coral Edge TPU software gives me "ModuleNotFoundError: No module named 'pycoral.adapters'" error

I am trying to install the Coral Edge TPU software on MacOS 11.5 by following these instructions:

https://coral.ai/docs/accelerator/get-started/#3-run-a-model-on-the-edge-tpu

But by the time I enter the following command into the console:

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

I get the following error:

Traceback (most recent call last):
  File "/Users/fabrizio/Desktop/work/MagneticChessResearch/machine learning/Coral/edgetpu_runtime/coral/pycoral/examples/classify_image.py", line 36, in <module>
    from pycoral.adapters import classify
ModuleNotFoundError: No module named 'pycoral.adapters'

Any ideas?

like image 602
Fabrizio Ferrari Avatar asked Jan 26 '26 07:01

Fabrizio Ferrari


1 Answers

I have the same issue on Windows 10. If you are using Python 3.9.x, and used the command pip3 install --extra-index-url https://google-coral.github.io/py-repo/ pycoral to install pycoral, then you will be installing a very old version of pycoral which does not have pycoral.adapters module. I think this is because the pycoral repo currently (June 2021) does not have the package built for Python 3.9.x.

The solution is to either build and install pycoral from source on your Mac using Python 3.9.x, or downgrade Python to 3.8.x and install pycoral again.

like image 186
azgolfer Avatar answered Jan 27 '26 21:01

azgolfer



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!