In this video, we will show you how to Fix generic_utils error when importing the segment model library

Note: Importing segmentation models library may give you generic_utils
error on TF2.x

If you get an error about generic_utils…


For Anaconda users:
Use this code to find out the location of site-packages directory
under your current environment in anaconda.

from distutils.sysconfig import get_python_lib

For Colab users:
You can click on the direct link provided on Colab for and edit it.
Remember to restart the runtime after editing the file.

Alternatively you can work with Tensorflow 1.x that doesn’t throw
the generic_utils error.
In google colab, add this as your first line.
%tensorflow_version 1.x
(Or just create a new environment in your local IDE to use TF1.x)



Fixing Generic_Utils Error While Importing Segmentation Models Library - Python tips and tricks
2.10 GEEK