keras-contrib icon indicating copy to clipboard operation
keras-contrib copied to clipboard

ModuleNotFoundError: No module named 'keras_applications'

Open ghost opened this issue 6 years ago • 21 comments

This is should be "keras.applications", but it is "keras_applications" in .densenet This is because files in /keras_contrib/applications is wrong

ghost avatar Jul 13 '18 03:07 ghost

I got the same issue while building TF from source https://www.tensorflow.org/install/install_sources

sdr2002 avatar Aug 17 '18 06:08 sdr2002

I am manually chaning the tf source's keras_applications into keras.applications at tensorflow/tensorflow/python/keras/applications/init.py will get back to this after rebuild

sdr2002 avatar Aug 17 '18 06:08 sdr2002

Just checked out master of TF and tried to build.

from tensorflow.python.keras import applications
  File "/home/jovyan/.cache/bazel/_bazel_root/e5cce820cc082410b4fcc604db349066/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/keras/applications/__init__.py", line 22, in <module>
    import keras_applications
ModuleNotFoundError: No module named 'keras_applications'
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 18102.662s, Critical Path: 593.70s
INFO: 12591 processes: 12591 local.
FAILED: Build did NOT complete successfully

mpekalski avatar Aug 26 '18 19:08 mpekalski

With pip just install keras_application and keras_preprocessing that should fix the issue of building TF from source.

mpekalski avatar Aug 26 '18 20:08 mpekalski

Thank you @mpekalski , that fixed the issue!!

DilnozaBobokalonova1 avatar Aug 29 '18 04:08 DilnozaBobokalonova1

I encountered the same error from 'No module named 'keras_applications' by using

pip install keras

tensorflow 1.10.0 has requirement for both. You can change to install the proper version by the time being. Now my program complied successfully in the latest master branch.

Note: in the current version I have receive incompatible warning image when I was trying to install them individually.

Thanks @mpekalski for pointing it out.

kiralpoon avatar Aug 31 '18 19:08 kiralpoon

@mpekalski

With pip just install keras_application and keras_preprocessing that should fix the issue of building TF from source.

I think this should say keras_applications with an "s" at the end.

Anyone doing this, remember your pip command for python 3.x might be pip3

dvisztempacct avatar Oct 08 '18 02:10 dvisztempacct

ModuleNotFoundError Traceback (most recent call last) in 3 import matplotlib.pyplot as plt 4 import seaborn as sns ----> 5 import keras.backend as K 6 from keras.preprocessing import sequence 7 from keras.preprocessing.text import Tokenizer

ModuleNotFoundError: No module named 'keras'

I installed keras using anaconda it was done successfully but whentrying my code in jupyter notebook i its showing the error as above

SanjanaNaidu avatar May 10 '19 16:05 SanjanaNaidu

How to avoid below error,

AttributeError: module 'keras_applications' has no attribute 'set_keras_submodules'

KafeelBasha avatar Jun 23 '19 12:06 KafeelBasha

it is erro about the version the keras, i were used keras=2.2.2 and i upgraded the keras=2.2.4

eliaquim10 avatar Jun 29 '19 03:06 eliaquim10

it is about the version of keras, i were with keras=2.2.2 and i upgraded to keras=2.2.4

eliaquim10 avatar Jun 29 '19 03:06 eliaquim10

When I use from keras.preprocessing import image I'm getting many module missing error How can I fix it IMG-20191006-WA0008 IMG-20191006-WA0009

Yogalasksmi avatar Oct 06 '19 10:10 Yogalasksmi

@Yogalasksmi Please check the keras 2.1.5 . I think problem in latest version. What version keras are you using ?

NarasimmanSaravana1994 avatar Nov 19 '19 06:11 NarasimmanSaravana1994

@Yogalasksmi Maybe you could use pip3 install --upgrade keras_preprocessing or reinstall it (uninstall and install) It works on my computer.

Evilran avatar Nov 20 '19 22:11 Evilran

@mpekalski

(/scratch3/3d_pose/animalpose/leap_env) [jalal@goku leap]$ pip install keras_application
ERROR: Could not find a version that satisfies the requirement keras_application (from versions: none)
ERROR: No matching distribution found for keras_application
(/scratch3/3d_pose/animalpose/leap_env) [jalal@goku leap]$ pip install keras_processing
ERROR: Could not find a version that satisfies the requirement keras_processing (from versions: none)
ERROR: No matching distribution found for keras_processing

monajalal avatar Dec 05 '19 03:12 monajalal

With pip just install keras_application and keras_preprocessing that should fix the issue of building TF from source.

thank you very much

Dawei-Simayi avatar Dec 06 '19 07:12 Dawei-Simayi

With pip just install keras_application and keras_preprocessing that should fix the issue of building TF from source.

It works. Thank you.

lipanpeng avatar Mar 15 '20 04:03 lipanpeng

With pip just install keras_application and keras_preprocessing that should fix the issue of building TF from source.

It works. Thank you.

application replace with applications then it is working

anandupes avatar Jun 27 '20 17:06 anandupes

With pip just install keras_application and keras_preprocessing that should fix the issue of building TF from source.

pip install keras_applications

mohammed-Emad avatar Jun 24 '21 23:06 mohammed-Emad

It will work with "pip install keras_applications" after that, if needed, just import keras_applications. for me, it worked

Kishansinh94 avatar Sep 14 '21 10:09 Kishansinh94

Try using !pip install keras_applications this solved it in my case!

ankitkumar-pi avatar Nov 15 '21 19:11 ankitkumar-pi