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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With