Search code examples
pythondebianaptgoogle-coralpycoral

Pycoral: but it is not going to be installed


When trying to install pycoral, I get this error:

~$ sudo apt-get install python3-pycoral
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.11.2-1+b1 is to be installed
E: Unable to correct problems, you have held broken packages.

This is for the M.2 m+b key version of the Edge TPU. What's the best way to fix this? Can I just install python 3.10 alongside the 3.11 python or do I need to completely revert to 3.10, or do I just completely misunderstand what's going on here?

Debian 12, kernel 6.1.0-17-amd64.

Edit: I've tried installing various versions of pyenv from 3.9.0 to 3.12.1, switching global version one by one but I always get the same message. I've also tried to install python3-tflite-runtime by itself and this is the error message:

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-tflite-runtime : Depends: python3 (< 3.10) but 3.11.2-1+b1 is to be installed
E: Unable to correct problems, you have held broken packages.

What does python3 (< 3.10) but 3.11.2-1+b1 is to be installed mean anyway?


Solution

  • Install Multiple Versions (lower version eg: 3.8.19) of Python on your Raspberry Pi check : https://www.samwestby.com/tutorials/rpi-pyenv#Step%203

    you can install PyCoral with pip: python3 -m pip install --extra-index-url https://google-coral.github.io/py-repo/ pycoral~=2.0

    Also be sure you have the latest version of the Edge TPU runtime.