Pip dependency resolution

Trying to install Tensorflow Lite on Raspberry Pi. On both Raspian and on a 64 bit Jenny OS I get this error:

]Downloading tflite_model_maker-0.1.0-py3-none-any.whl (84 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 84.6/84.6 kB 181.4 kB/s eta 0:00:00
ERROR: Cannot install tflite-model-maker==0.1.0, tflite-model-maker==0.1.1, tflite-model-maker==0.1.2, tflite-model-maker==0.2.0, tflite-model-maker==0.2.1, tflite-model-maker==0.2.2, tflite-model-maker==0.2.3, tflite-model-maker==0.2.4, tflite-model-maker==0.2.5, tflite-model-maker==0.3.0, tflite-model-maker==0.3.1, tflite-model-maker==0.3.2, tflite-model-maker==0.3.3, tflite-model-maker==0.3.4 and tflite-model-maker==0.4.0 because these package versions have conflicting dependencies.

The conflict is caused by:
tflite-model-maker 0.4.0 depends on numba==0.53
tflite-model-maker 0.3.4 depends on numba==0.53
tflite-model-maker 0.3.3 depends on numba==0.53
tflite-model-maker 0.3.2 depends on tensorflow-addons>=0.11.2
tflite-model-maker 0.3.1 depends on tensorflow-addons>=0.11.2
tflite-model-maker 0.3.0 depends on tensorflow-addons>=0.11.2
tflite-model-maker 0.2.5 depends on tensorflow-addons>=0.11.2
tflite-model-maker 0.2.4 depends on tflite-support==0.1.0rc4
tflite-model-maker 0.2.3 depends on tflite-support==0.1.0rc3.dev2
tflite-model-maker 0.2.2 depends on tflite-support==0.1.0rc3.dev2
tflite-model-maker 0.2.1 depends on tflite-support==0.1.0rc3.dev2
tflite-model-maker 0.2.0 depends on tf-nightly==2.4.0.dev20200810
tflite-model-maker 0.1.2 depends on tflite-support==0.1.0rc3.dev2
tflite-model-maker 0.1.1 depends on tf-nightly
tflite-model-maker 0.1.0 depends on tf-nightly

To fix this you could try to:

  1. loosen the range of package versions you’ve specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit Dependency Resolution - pip documentation v22.2.dev0

i have same issue want any proper solution.

Yes, even on a new install of 64 bit Raspian, without other things installed, this still comes up when trying to install model maker. I can’t run any examples or create a new AI model.

Now, I understand we are not supposed to install Model Maker on the Raspberry Pi, it requires more computing power to train the AI model than the Raspi can offer. So install Model Maker on Google Colab and train the model there. And then take the trained model and insert it into one of the example scripts instead of the example model.

Unfortunately, pip makes no attempt to resolve dependency conflicts. For example, if you install two packages, package A may require a different version of a dependency than package B requires.

Practically, this is the answer. The tflite-model-maker package is a source/any package, so it theoretically supports raspberry pi, but its dependencies do not.

I have a slightly different set of constraints on my device, but the problem is the same. e.g.

...
The conflict is caused by:
    tflite-model-maker 0.4.0 depends on scann>=1.2.6
...

This can’t install because scann only has x86_64 binary distributions. If anyone really wants to make it work, you could consider talking to the dependent packages about providing source distributions or binaries compiled for armv7. You could also try to building a version of model maker with the dependencies removed if you don’t need them. Neither of these will be much fun.

1 Like

I faced the same problem, and I spent time trying to change the versions of Python until I discovered that the matter has something to do with pip … I used pip 19, and the solution was to upgrade it by
pip install --upgrade pip