Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
leoniloris opened this issue Mar 31, 2021 · 19 comments
Assignees

Comments

@leoniloris
Copy link

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
Copy link
Author

Any news?

@jakew009
Copy link

Having exactly the same issue... anyone?

@paullee2018
Copy link

paullee2018 commented Apr 14, 2021

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
Copy link

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
Copy link

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

@Naveen-Dodda Naveen-Dodda self-assigned this May 10, 2021
@abelhouchat
Copy link

@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
Copy link

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

@hjonnala
Copy link
Contributor

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

@maazullah96
Copy link

maazullah96 commented Jul 13, 2021

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

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

@hjonnala
Copy link
Contributor

@leoniloris are you able to fix the issue.

@mprhode
Copy link

mprhode commented Jul 14, 2021

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
Copy link

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

@japm48
Copy link

japm48 commented Jul 16, 2021

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
Copy link
Contributor

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
Copy link

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
Copy link

kzgrey commented Sep 18, 2022

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
Copy link

bme323 commented Mar 6, 2023

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
Copy link

wlau2929 commented May 4, 2023

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
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests