cancel
Showing results for 
Search instead for 
Did you mean: 

Model Zoo: ModuleNotFoundError: No module named 'tabulate'

qaarah
Visitor

Hi, 
https://www.youtube.com/watch?v=yuSVz3x9LzE&list=PLnMKNibPkDnG9IC5Nl9vJg1CKMAO1kODW&index=3

Here in this demo, the training is done using train.py. And also if you run image_classification\src>python stm32ai_main.py config_file_examples\training_config.yaml", the following error is encountered:

in <module>
from tabulate import tabulate
ModuleNotFoundError: No module named 'tabulate'

Is there any update regarding this?

Thanks

3 REPLIES 3
Julian E.
ST Employee

Hello @qaarahqaarah,

 

Something probably went wrong when you installed the requirements. Please follow the before you start.

(If you made the virtual environment as explained in the before you start, make sure to activate the environment in a CMD before running the python script.)

 

Alternatively, you can install the module manually:

 

pip install tabulate

 

 Still, I highly suggest following the before you start as it may not be the only thing that went wrong.

 

Have a good day,

Julian


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thanks! 
I followed the same. However, I made some changes to the requirements.txt as most of the versions were outdated. Anyway, after installing tabulate here is the following error. <module>
from keras.utils.layer_utils import count_params
ModuleNotFoundError: No module named 'keras.utils.layer_utils'

Hello @qaarah ,

 

The idea behind giving you the requierement.txt file is for you to have the same versions of the python modules for the code to work.

In your example, keras moved layer_utils. So,in your new version of keras, it is somewhere else then keras.utils.layer_utils making the code not work when trying to import it.

 

Just create a virtual environment as explained in the before you start and use the modules versions in the requirements.txt for model zoo and you will be fine. 

 

(New versions of modules sure improve the libraries but it will not make a major difference, so it is fine to keep old versions. And if it does change a lot, we will surely update it and also update our code.)

 

Have a good day,
Julian


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.