Currently, TensorFlow does not officially support Python 3.12. You should use Python versions 3.8 to 3.11 instead. Refer to the official Python documentation to install a compatible version (3.8 to 3.11)