Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: Cannot install tflite-model-maker (The conflict is caused by other modules)

I am trying to use tflite-model-maker package in one of my Kaggle notebook. It shows module not found then I tried to install it using,

!pip install tflite_model_maker

However, it yields the following error:

.....
ERROR: Cannot install 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.3, tflite-model-maker==0.3.4, tflite-model-maker==0.4.0, tflite-model-maker==0.4.1 and tflite-model-maker==0.4.2 because these package versions have conflicting dependencies.

The conflict is caused by:
    tflite-model-maker 0.4.2 depends on numba==0.53
    tflite-model-maker 0.4.1 depends on numba==0.53
    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.2.5 depends on tflite-support==0.1.0rc4
    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 tflite-support==0.1.0rc3.dev2
    tflite-model-maker 0.1.2 depends on tflite-support==0.1.0rc3.dev2

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

How can I perform the options they suggested? Is there any way around straight forward?

like image 673
Sazzad Hissain Khan Avatar asked Oct 20 '25 13:10

Sazzad Hissain Khan


1 Answers

This is a python version issue. numba==0.53 only exists for python versions <3.9, so you will need to change the python verison in your kaggle notebook by executing these commands in your notebook:

!conda create -n newCondaEnvironment -c conda-forge python=3.9 -y

!sudo rm /opt/conda/bin/python3.10
!sudo ln -sf /opt/conda/envs/newCondaEnvironment/bin/python3 /opt/conda/bin/python3.10


!sudo rm /opt/conda/bin/python
!sudo ln -s /opt/conda/envs/newCondaEnvironment/bin/python3 /opt/conda/bin/python
like image 69
FlyingTeller Avatar answered Oct 22 '25 03:10

FlyingTeller



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!