Sandeep, I had similar problems, trying to install tensorflow-macos via pyenv and "pyenv virtualenv", it simply didn't go anywhere. What finally did the trick for me was following the instructions at https://developer.apple.com/metal/tensorflow-plugin/
This involves installing "Conda", using it to install the dependencies and finally installing tensorflow-macos and tensorflow-metal via "python -m pip install ...".
This got me up and running on my MacBook Pro M1/max. Good luck.