Jan-10-2022, 07:31 PM
In the following import statements there is an error
this is the error that I get on that initial line.
Thanks in advance for any help.
Respectfully,
LZ
from utils.create_features_utils import * import pandas as pd import numpy as np from keras import models, layers from keras.callbacks import ModelCheckpoint, EarlyStopping from keras.preprocessing.text import TokenizerIt apparently does not like the statement
from keras import models, layersIt gives a very cryptic error. Which I do not understand. By the way keras is installed.
this is the error that I get on that initial line.
Error:AttributeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_21752/4287243873.py in <module>
2 import pandas as pd
3 import numpy as np
----> 4 from keras import models, layers
5 from keras.callbacks import ModelCheckpoint, EarlyStopping
6 from keras.preprocessing.text import Tokenizer
~\miniconda3\lib\site-packages\keras\__init__.py in <module>
19 """
20 # pylint: disable=unused-import
---> 21 from tensorflow.python import tf2
22 from keras import distribute
23
~\miniconda3\lib\site-packages\tensorflow\__init__.py in <module>
39 import sys as _sys
40
---> 41 from tensorflow.python.tools import module_util as _module_util
42 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader
43
~\miniconda3\lib\site-packages\tensorflow\python\__init__.py in <module>
45 from tensorflow.python import data
46 from tensorflow.python import distribute
---> 47 from tensorflow.python import keras
48 from tensorflow.python.feature_column import feature_column_lib as feature_column
49 from tensorflow.python.layers import layers
~\miniconda3\lib\site-packages\tensorflow\python\keras\__init__.py in <module>
25
26 # See b/110718070#comment18 for more details about this import.
---> 27 from tensorflow.python.keras import models
28
29 from tensorflow.python.keras.engine.input_layer import Input
~\miniconda3\lib\site-packages\tensorflow\python\keras\models.py in <module>
24 from tensorflow.python.keras import metrics as metrics_module
25 from tensorflow.python.keras import optimizers
---> 26 from tensorflow.python.keras.engine import functional
27 from tensorflow.python.keras.engine import sequential
28 from tensorflow.python.keras.engine import training
~\miniconda3\lib\site-packages\tensorflow\python\keras\engine\functional.py in <module>
36 from tensorflow.python.keras.engine import keras_tensor
37 from tensorflow.python.keras.engine import node as node_module
---> 38 from tensorflow.python.keras.engine import training as training_lib
39 from tensorflow.python.keras.engine import training_utils
40 from tensorflow.python.keras.saving.saved_model import network_serialization
~\miniconda3\lib\site-packages\tensorflow\python\keras\engine\training.py in <module>
51 from tensorflow.python.keras.engine import training_utils
52 from tensorflow.python.keras.mixed_precision.experimental import loss_scale_optimizer as lso
---> 53 from tensorflow.python.keras.saving import hdf5_format
54 from tensorflow.python.keras.saving import save
55 from tensorflow.python.keras.saving.saved_model import model_serialization
~\miniconda3\lib\site-packages\tensorflow\python\keras\saving\hdf5_format.py in <module>
39 # pylint: disable=g-import-not-at-top
40 try:
---> 41 import h5py
42 HDF5_OBJECT_HEADER_LIMIT = 64512
43 except ImportError:
~\miniconda3\lib\site-packages\h5py\__init__.py in <module>
32 raise
33
---> 34 from . import version
35
36 if version.hdf5_version_tuple != version.hdf5_built_version_tuple:
~\miniconda3\lib\site-packages\h5py\version.py in <module>
15
16 from collections import namedtuple
---> 17 from . import h5 as _h5
18 import sys
19 import numpy
h5py\h5.pyx in init h5py.h5()
AttributeError: type object 'h5py.h5.H5PYConfig' has no attribute '__reduce_cython__'
[code]
I do not understand this error. How do I correct it? As I said before keras 3.0.0 is installed.Thanks in advance for any help.
Respectfully,
LZ