I'm trying to implement YOLO3 object detection using tensorflow 2.0 on google colab : https://github.com/theAIGuysCode/Object-Detection-API
And for this particular line:
!python3 /content/Object-Detection-API/load_weights.py
I'm facing this error:
ModuleNotFoundError: No module named 'keras_preprocessing'
I tried installing 'keras_preprocessing' using this command:
!conda install keras_preprocessing
and then I'm facing this error:
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- keras_preprocessing
Current channels:
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
Please help me solve the same! Thank you!
N.B: This answer is for those who are facing this error recently due to version change
The error ModuleNotFoundError: No module named 'keras.preprocessing.text' usually occurs because recent versions of TensorFlow have moved keras.preprocessing.text to tensorflow.keras.preprocessing.text
Steps to solve:
keras.preprocessing.text to from tensorflow.keras.preprocessing.text import Tokenizerpip install tensorflow-textFrom the Anaconda repository of the Keras Preprocessing package, you can install it with
conda install -c conda-forge keras-preprocessing
that is, with an - instead of _ and with selecting the conda-forge channel.
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