Nov-03-2020, 03:58 PM

The following code on Windows 10 creates the error shown.

Any help appreciated.Thanks in advance.

Respectfuuly,

ErnestTBass

import math import numpy as np import pandas as pd import os import yfinance as yf import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec %matplotlib inline from pandas.plotting import register_matplotlib_converters register_matplotlib_converters() from keras.models import Sequential from keras import layers from keras.layers import Activation, Dropout, Flatten, Dense, Conv2D, MaxPooling2D

```
Error:ModuleNotFoundError Traceback (most recent call last)
~\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\__init__.py in <module>
2 try:
----> 3 from tensorflow.keras.layers.experimental.preprocessing import RandomRotation
4 except ImportError:
ModuleNotFoundError: No module named 'tensorflow.keras.layers.experimental'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
<ipython-input-1-162fe132a741> in <module>
10 register_matplotlib_converters()
11
---> 12 from keras.models import Sequential
13 from keras import layers
14 from keras.layers import Activation, Dropout, Flatten, Dense, Conv2D, MaxPooling2D
~\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\__init__.py in <module>
4 except ImportError:
5 raise ImportError(
----> 6 'Keras requires TensorFlow 2.2 or higher. '
7 'Install TensorFlow via `pip install tensorflow`')
8
ImportError: Keras requires TensorFlow 2.2 or higher. Install TensorFlow via `pip install tensorflow`
```

However, tensorflow is installed. Both pip list and conda list confirm this.So what is going on? I am using tensorflow 2.3.Any help appreciated.Thanks in advance.

Respectfuuly,

ErnestTBass