I tried installing numpy using the command 'pip install numpy' and ran 'import numpy' but I received the error ModuleNotFoundError: No module named 'numpy' when I tried to re-run the code. After reading similar questions on SO, I ran pip3 install numpy, but since i already installed it, I received the message Requirement already satisfied.
NOTE: I have read other similar questions on SO, but none of them solve my problem.
Possible solution for future readers:
Like @Sampath mentioned in his answer, I had two versions of python installed. To solve the issue, I manually deleted all the installation files of the older version.