No module tensorflow found

Im writing this code to just start visualizing my data series:

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
#from pandas.plotting import register_matplotlib_converters
%matplotlib inline
from statsmodels.tools.eval_measures import rmse
from sklearn.preprocessing import MinMaxScaler


from keras.preprocessing.sequence import TimeseriesGenerator
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import LSTM
from keras.layers import Dropout
import warnings
warnings.filterwarnings("ignore")


df=pd.read_excel('DataLSTMReady.xlsx')
# Visualize the data in table form
#print(len(df))
#df.head(5)

# Filter which columns to visualize
df.date=pd.to_datetime(df.Date)
df=df.set_index('Date')
#NOTE:df.iloc[:,0:a]
#df=df.iloc[:,[0]]
print(df)

but when I run it i get this:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
/var/folders/4v/_w631kv96hs1ql8fm07vzlz80000gn/T/ipykernel_6630/2719849702.py in <module>
      8 
      9 
---> 10 from keras.preprocessing.sequence import TimeseriesGenerator
     11 from keras.models import Sequential
     12 from keras.layers import Dense

~/opt/anaconda3/lib/python3.9/site-packages/keras/__init__.py in <module>
     18 [keras.io](https://keras.io).
     19 """
---> 20 from keras import distribute
     21 from keras import models
     22 from keras.engine.input_layer import Input

~/opt/anaconda3/lib/python3.9/site-packages/keras/distribute/__init__.py in <module>
     16 
     17 
---> 18 from keras.distribute import sidecar_evaluator

~/opt/anaconda3/lib/python3.9/site-packages/keras/distribute/sidecar_evaluator.py in <module>
     15 """Python module for evaluation loop."""
     16 
---> 17 import tensorflow.compat.v2 as tf
     18 
     19 # isort: off

ModuleNotFoundError: No module named 'tensorflow'

How can I get that module installed?

dear quique123.

Thank you for your contribution to the anaconda community.

do you have tensorflow installed? haven’t you? I do not understand, but basically at the beginning of the program
“import tensorflow as tf”
is not written, the corresponding module will not be automatically imported.

And those packages are tied together by related packages, but basically should be resolved by scripts.

Best regards.