ImportError: cannot import name 'Conv2D' from 'tensorflow.keras.layers'

i am using tensorflow 2.14 , keras 2.14 , vscode nanaconda
when i use this line

from tensorflow.keras.layers import Conv2D

i get this error
ImportError: cannot import name ‘Conv2D’ from ‘tensorflow.keras.layers’

Unfortunately, I’m unable to reproduce the error using a PC here as we speak.
For people to help you better can you also please mention your OS and python version, and anything that could be relevant?

Hi @chahde

Welcome to the TensorFlow Forum!

I am able to replicate the code without any error. Please ensure that you have selected correct VirEnv or kernel to execute the code.

Please have a look at below screenshot: