skip to Main Content

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?

2

Answers


  1. The docs say:

    If you’re using a Debian-based Linux system (including Ubuntu, Raspberry Pi OS, and Mendel), you should install all software libraries with the following Debian packages, instead of using the other pip or ZIP packages.

    If you’re on a Debian system other than a Coral board with Mendel, first add our package repos:

    # None of this is needed on Coral boards
    # This repo is needed for almost all packages below
    echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
    # This repo is needed for only python3-coral-cloudiot and python3-coral-enviro
    echo "deb https://packages.cloud.google.com/apt coral-cloud-stable main" | sudo tee /etc/apt/sources.list.d/coral-cloud.list
    
    curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
    
    sudo apt-get update
    Then you can install packages from the below table like this:
    
    sudo apt-get install <package_name>
    
    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search