google-coral / pycoral

Python API for ML inferencing and transfer-learning on Coral devices
https://coral.ai
Apache License 2.0
351 stars 145 forks source link

No module named 'pycoral.pybind._pywrap_coral' (aarch64, debian bullseye, python 3.9) #24

Closed leoniloris closed 3 years ago

leoniloris commented 3 years ago

Hello folks! So, I have the following system

debian bullseye
python 3.9
architecture aarch64 (arm64 or armv8)

after some time struggling, I compiled manually and generated the both tflite and pycoral for my board, installed them both and I'm trying to follow https://coral.ai/docs/m2/get-started/#4-run-a-model-on-the-edge-tpu But I'm facing the following problem ModuleNotFoundError: No module named 'pycoral.pybind._pywrap_coral'

I have no Idea what I did wrong. do you guys know?

leoniloris commented 3 years ago

Any news?

jakew009 commented 3 years ago

Having exactly the same issue... anyone?

paullee2018 commented 3 years ago

I have something similar using python 3.7 on a raspberry pi4.

Traceback (most recent call last): File "test_coral.py", line 8, in <module> from pycoral.utils import edgetpu File "/home/pi/projects/coral/pycoral/pycoral/utils/edgetpu.py", line 24, in <module> from pycoral.pybind._pywrap_coral import GetRuntimeVersion as get_runtime_version ModuleNotFoundError: No module named 'pycoral.pybind'

abelhouchat commented 3 years ago

I ran into a similar issue with pycoral. I believe it's because classify_image.py is confusing the pycoral package with the pycoral folder. I was able to resolve it by renaming the pycoral folder to something else.

Naveen-Dodda commented 3 years ago

@abelhouchat May I know on which platform you have this issue. Can you mention how you have installed python3-pycoral ?

abelhouchat commented 3 years ago

@Naveen-Dodda This is on Ubuntu 18.04. I installed pycoral as recommended in the tutorial, using sudo apt-get install python3-pycoral

Naveen-Dodda commented 3 years ago

Can you try a pip install instead https://coral.ai/software/#pycoral-api

hjonnala commented 3 years ago

Hello, does anyone here still facing the issue. If yes, please let me know the python version and operating system have been used.

maazullah96 commented 3 years ago

Solved the issue by installing through the whl file https://coral.ai/software/#pycoral-api

Screenshot from 2021-07-13 14-02-59

hjonnala commented 3 years ago

@leoniloris are you able to fix the issue.

mprhode commented 3 years ago

I'm still having the issue with Ubuntu 18.04 and python 3.8.8 (apt install -> ModuleNotFound) pip3 install from the instructions linked above worked

maazullah96 commented 3 years ago

@mprhode Did you have tried the installation from whl file?

japm48 commented 3 years ago

I had the exact same problem in Windows, and after hours of guessing/debugging I realised that I forgot to install the Edge TPU runtime (step 1 in the instructions...). Note that, at least in my case, the "No module named" error is misleading: the pyd module is actually found but it fails to load because it cannot find some DLL/.so dependency (my candidates are libusb, UsbDk or libedgetpu). This can be debugged in Windows by loading with ctypes.WinDLL (possibly something similar with Linux).

Possibly related to #18 and #32. Oops... just read the last messages in there.

hjonnala commented 3 years ago

The issue(No module named 'pycoral.pybind._pywrap_coral') can be resolved using the whl files from this source : https://github.com/google-coral/pycoral/releases for python vesrions 3.5 - 3.8.

minhhoai1001 commented 2 years ago

I ran into a similar issue with pycoral. I believe it's because classify_image.py is confusing the pycoral package with the pycoral folder. I was able to resolve it by renaming the pycoral folder to something else.

Thank you. I work for me.

kzgrey commented 1 year ago

ModuleNotFoundError: No module named 'pycoral.pybind._pywrap_coral'

If you get this error, its because there's a directory in the repo called pycoral. If you mv pycoral pycoral2 everything starts working. No need to downgrade Python.

bme323 commented 1 year ago

Hi, I am having a similar problem.

When I enter step 3 from https://coral.ai/docs/accelerator/get-started/#3-run-a-model-on-the-edge-tpu I get error code: Traceback (most recent call last): File "examples/classify_image.py", line 37, in from pycoral.adapters import classify ModuleNotFoundError: No module named 'pycoral'

I have downgraded to python 3.7.12 from 3.9.2 (RPi 4), running on arm7l 32-bit. I have also tried installing the whl file and tried renaming the pycoral folder name to pycoral2 as suggested.

All have had no success. Any help on this?

wlau2929 commented 1 year ago

Hi, I am having a similar problem.

When I enter step 3 from https://coral.ai/docs/accelerator/get-started/#3-run-a-model-on-the-edge-tpu I get error code: Traceback (most recent call last): File "examples/classify_image.py", line 37, in from pycoral.adapters import classify ModuleNotFoundError: No module named 'pycoral'

I have downgraded to python 3.7.12 from 3.9.2 (RPi 4), running on arm7l 32-bit. I have also tried installing the whl file and tried renaming the pycoral folder name to pycoral2 as suggested.

All have had no success. Any help on this?

I'm having the same issue. I can run the test on the host machine but when I run it in docker i get this same error. Did you get it working?

Nick-P-Orr commented 7 months ago

I'm having the same issue. I can run the test on the host machine but when I run it in docker i get this same error. Did you get it working?

I'm having this issue as well. Any update?