Pip install tflite-model-maker fails

``!pip install tflite-model-maker fails or hangs forever

I am using the tensor flow lite model maker for image classification notebook to test the model building for edge devices but the notebook fails while installing tflite model maker.

Either the notebook keep downloading the files or crashed. If anyone has the solution kindly tell me or help me

thanks in advance

1 Like


Welcome to the Tensorflow Forum!

Thank you for reporting the issue.


Could you please try a temporary solution, as suggested here?

Thank you!

@chunduriv when I select Use fallback runtime version I get this message:

The fallback runtime version is unavailable at this time.

And the Python version stays in 3.10.11. It looks like the fallback runtime is not available anymore, is there another workaround?

1 Like

I support this issue, fallback is no more available for google colab
I even tried to subscribe to paid version, had a thought it’s pro feature, but no.

There was suggestion to train with media pipe. It looks interesting but doesn’t have all required features and models that are available in TFLiteModelMaker

I suggested the way to use tflite-model-maker in colab here

its still not working,
when trying to install tflite-model-maker

ERROR: Could not find a version that satisfies the requirement tflite-support>=0.4.2 (from tflite-model-maker) (from versions: 0.1.0a0.dev3, 0.1.0a0.dev4, 0.1.0a0.dev5, 0.1.0a0, 0.1.0a1)

ERROR: No matching distribution found for tflite-support>=0.4.2

Im using a Mac M2.
I ve tried all possible solutions published, and none works so far.

1 Like

Tried to install tflite-model-maker to build a custom model but cannot install the package. same issues as above tried with different python & pip version but doesnot help.
Also is there a way we can verify if the yolov5 model converted to tflite model works as expected?

@Kanika_Yadav, @Ivan_Pasco,

Welcome to the Tensorflow Forum,

Please try the workaround recommended in the thread below

Thank you!

1 Like


You can verify the model using Tensorflow Lite Interpreter as shown below

import numpy as np
import tensorflow as tf

# Load the TFLite model and allocate tensors.
interpreter = tf.lite.Interpreter(model_path="converted_model.tflite")

# Get input and output tensors.
input_details = interpreter.get_input_details()
output_details = interpreter.get_output_details()

# Test the model on random input data.
input_shape = input_details[0]['shape']
input_data = np.array(np.random.random_sample(input_shape), dtype=np.float32)
interpreter.set_tensor(input_details[0]['index'], input_data)


# The function `get_tensor()` returns a copy of the tensor data.
# Use `tensor()` in order to get a pointer to the tensor.
output_data = interpreter.get_tensor(output_details[0]['index'])

Thank you!

If people are still struggling with installing tflite-model-maker pip install failing i’ve created a Git that runs through the current workaround people are using:

Just lays out the process for the Android Figurine example but you can amend to your own data and training prefs.

Posted a thread for this process as well in General Discussion.