I installed scikit-learn and I try to meke some predictions with fit(). But I have some errors like

from sklearn.neighbors import KNeighborsRegressor
knn = KNeighborsRegressor()
from sklearn.neighbors import KNeighborsRegressor
knn = KNeighborsRegressor(algorithm=‘brute’)
knn.fit(train_features, train_target)
predictions = knn.predict(test_features)
knn.fit(norm_train_df[cols], norm_train_df[‘price’])
two_features_predictions = knn.predict(norm_test_df[cols])

Error:
NameError: name ‘train_features’ is not defined

It looks like some of the variables you are using in your code have not been defined. train_features, train_target etc should all be lists or array-like, but have not been defined here.
A good example of usage taken from the sklearn docs (https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsRegressor.html) :

train_features = [[0], [1], [2], [3]]
train_target = [0, 0, 1, 1]
from sklearn.neighbors import KNeighborsRegressor
neigh = KNeighborsRegressor(n_neighbors=2)
neigh.fit(train_features, train_target)

print(neigh.predict([[1.5]]))