google-coral / edgetpu

Coral issue tracker (and legacy Edge TPU API source)
https://coral.ai
Apache License 2.0
412 stars 124 forks source link

Update "Install the PyCoral library" instructions #771

Open Lockie85 opened 1 year ago

Lockie85 commented 1 year ago

Description

Hey, firstly I just want to note I've tried following numerous guides and nothing appears to work.

Setup: Intel NUC, NUC11PAHi7 32GB+1TB Ubuntu Server 22.04.2 LTS Linux ubuntu-whytings 5.15.0-75-generic #82-Ubuntu SMP Tue Jun 6 23:10:23 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Request: Can the following instructions be updated to work with varying setups and maybe a bit more direction if possible: https://coral.ai/docs/accelerator/get-started/#2-install-the-pycoral-library

From what I can tell it requires old versions of things to function. If that is the only way it can possibly function in the short term then it feels like that should ideally be a part of the instructions plus alittle extra direction for n00bs to get it working.

When I get to running command: sudo apt-get install python3-pycoral

I get the following error:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-pycoral : Depends: python3-tflite-runtime (= 2.5.0.post1) but it is not going to be installed
                   Depends: python3 (< 3.10) but 3.10.6-1~22.04 is to be installed
E: Unable to correct problems, you have held broken packages.

I can't find a way to get around this problem.

Many Thanks

hjonnala commented 1 year ago

sudo apt-get install python3-pycoral

HI, which python version are you using? If its python3.10, the command won't work. Please try to build wheels for it.

Thanks!!

Lockie85 commented 1 year ago

sudo apt-get install python3-pycoral

HI, which python version are you using? If its python3.10, the command won't work. Please try to build wheels for it.

Thanks!!

Thanks for the reply but I don't understand how to build wheels. Are the instructions on what exact commands need to be run?

easy-and-simple commented 1 year ago

What do you want to do with pycoral? You just want to learn AI or you want to perform some specific task? Google coral team doesn't respect us and dont care that it doesn't work. This pycoral library is real garbage and you don't need it at all. There is no documentation, updates and support for it.

Lockie85 commented 1 year ago

What do you want to do with pycoral? You just want to learn AI or you want to perform some specific task? Google coral team doesn't respect us and dont care that it doesn't work. This pycoral library is real garbage and you don't need it at all. There is no documentation, updates and support for it.

I could very well be mislead. What I'm trying to do is run Frigate NVR and utilise the Coral USB for object detection. This would be running on my Intel NUC which is running Ubuntu.

Am I looking to do the right thing? Or just making life hard for myself :)

easy-and-simple commented 1 year ago

To run frigate is enough to install coral driver sudo apt-get install libedgetpu1-std because frigate runs in docker container. This means that all required to have coral acceleration in frigate is installed inside frigate docker container. You could use libedgetpu1-max instead libedgetpu1-std that will give you better performance, but because coral device will run continuously it could overheat and hang/freeze

vavallee-wp commented 1 year ago

I use Frigate as well, and it's working perfectly on a kubernetes node. However I would like to be able to run some pycoral projects, and I cannot install it, with the same error as above. Tried many things that were suggested online to no avail. Even installing python 3.9.x doesn't seem to help.

victoryred commented 10 months ago

Make sure you have python 3.9.17 installed. If not get it. Then

Perform the following- pyenv versions pyenv local 3.9.17

Verify your work $ pyenv versions system

Then- pip install https://google-coral.github.io/py-repo/tflite-runtime/tflite_runtime-2.5.0.post1-cp39-cp39-linux_x86_64.whl

pip install https://github.com/google-coral/pycoral/releases/download/v2.0.0/pycoral-2.0.0-cp39-cp39-linux_x86_64.whl

That'll do it.