Just an update: Just in case anyone runs into the same issue in the future, I had to install Raspbian 64-bit (aarch64) which is the latest version of the Raspbian OS for Raspberry Pi’s having a 64-bit architecture support, then installed Tensorflow 2.5.0 and Opencv 4.5.2 both from a source. I never recommend installing Tensorflow and OpenCV using the pip commands. Always go for sources.