I was having this problem with tensorflow-cpu version 2.19, I just installed pip install tensorflow_cpu==2.18 and it worked