Python Forum
Keras. ModuleNotFoundError: No module named 'error'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keras. ModuleNotFoundError: No module named 'error'
#1
Hello I am trying to run a script and I am getting error like this:
My set up:
- Python 3.5
- Tensorflow 1.12.-foss-2018b-OpenBLAS-0.3.1


Error:
/pstore/apps/Python/3.6.5-2018.05/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. from ._conv import register_converters as _register_converters Using TensorFlow backend. /pstore/apps/TensorFlow/1.12.0-foss-2018b-Python-3.6.5-2018.05/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:523: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) /pstore/apps/TensorFlow/1.12.0-foss-2018b-Python-3.6.5-2018.05/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:524: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) /pstore/apps/TensorFlow/1.12.0-foss-2018b-Python-3.6.5-2018.05/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) /pstore/apps/TensorFlow/1.12.0-foss-2018b-Python-3.6.5-2018.05/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) /pstore/apps/TensorFlow/1.12.0-foss-2018b-Python-3.6.5-2018.05/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) /pstore/apps/TensorFlow/1.12.0-foss-2018b-Python-3.6.5-2018.05/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:532: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) Traceback (most recent call last): File "test.py", line 4, in <module> from keras import backend as K File "Keras-2.0.8/keras/__init__.py", line 4, in <module> from . import activations File "Keras-2.0.8/keras/activations.py", line 6, in <module> from .engine import Layer File "Keras-2.0.8/keras/engine/__init__.py", line 3, in <module> from .topology import InputSpec File "Keras-2.0.8/keras/engine/topology.py", line 8, in <module> import yaml File "Keras-2.0.8/yaml/__init__.py", line 2, in <module> from error import * ModuleNotFoundError: No module named 'error'
I would be appreciate for any help please.
Reply
#2
First you have to uninstall Tensorflow-

pip uninstall tensorflow


Then you should reinstall - tensorflow & Keras

pip install tensorflow
pip install keras


Hope this will work to remove the error!!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  1st layer tf.keras output shape set at multiple - need help! Afrodizzyjack 0 1,820 Jun-07-2022, 04:53 PM
Last Post: Afrodizzyjack
  issue displaying summary of whole keras CNN model on TensorFlow with python Afrodizzyjack 0 1,651 Oct-27-2021, 04:07 PM
Last Post: Afrodizzyjack
  Understanding Keras and TensorFlow and how to use them bytecrunch 1 2,074 Mar-11-2021, 02:40 PM
Last Post: jefsummers
  Problems feeding live input from my microphone into a keras model (SegFault: 11) zeptozetta 1 2,580 Sep-14-2020, 03:08 AM
Last Post: zeptozetta
  Keras.Predict into Dataframe Finpyth 13 9,793 Aug-31-2020, 07:22 AM
Last Post: hussainmujtaba
  Making a Basic Keras Model - Input Shape and Parameters MattKahn13 0 2,114 Aug-16-2020, 04:36 PM
Last Post: MattKahn13
  Error when import Keras Azadfalah 1 2,793 Apr-29-2020, 04:45 AM
Last Post: buran
  Keras + Matplotlib causing crash spearced 3 4,507 Feb-06-2020, 04:54 PM
Last Post: zljt3216
  Keras Dense layer with wrong input d1r4c 0 1,761 Jan-02-2020, 02:35 PM
Last Post: d1r4c
  Keras: Time series classification midarq 0 1,995 Sep-25-2019, 09:03 AM
Last Post: midarq

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020