After running the following command,
pip3 install tensorflow
tensorflow 2.10.0 was installed.
Then following,
python3
import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pi/.local/lib/python3.9/site-packages/tensorflow/__init__.py", line 359, in <module>
_current_module.compat.v2 # pylint: disable=pointless-statement
AttributeError: module 'tensorflow._api.v2.compat' has no attribute 'v2'
above error arises.