I successfully installed tensorflow-cpu as pip install tensorflow-cpu
However, when trying to import the package, I am receiving this error on first line.
import tensorflow-cpu as tf
import numpy as np
from tensorflow.keras import Sequential
from tensorflow.keras.layers import Dense
l0 = Dense(units=1, input_shape=[1])
model = Sequential([l0])
model.compile(optimizer='sgd', loss='mean_squared_error')
xs = np.array([-1.0, 0.0, 1.0, 2.0, 3.0, 4.0], dtype=float)
ys = np.array([-3.0, -1.0, 1.0, 3.0, 5.0, 7.0], dtype=float)
model.fit(xs, ys, epochs=500)
ERROR Line 1: No module named tensorflow.
How can I resolve this issue?
I don't have the updated GPU or NVIDIA Packages, not supported on my laptop, so it was recommended to utilize cpu version.