tf.keras.layers.IntegerLookup not found

I am confused, the documentation says that tensorflow.keras.layers.IntegerLookup exists tf.keras.layers.IntegerLookup | TensorFlow Core v2.6.0. But when I try to import it with from tensorflow.keras.layers import IntegerLookup I get: Cannot find reference ‘IntegerLookup’ in ‘ | | tensorflow.keras.layers’

Am I misunderstanding the documentation or did I screw up the installation somehow? I am running Python 3.9 and tensorflow 2.6. I used pip install tensorflow to install tensorflow, I also tried Python 3.7 and Tensorflow 2.5 but I get the same message.

I think that probably there Is something wrong with your installation.

Can you reproduce this error in our official Docker image or on Google Colab?

You seem to be correct. I tried Google collab and it worked fine. Do you have any idea how I can fix this or what I could have done wrong?

Could you try uninstalling and reinstalling using the directions provided here? It’s recommended to use a virtual environment.