PyTorch ModuleNotFoundError: No module named numpy

Error while building PyTorch project:

Traceback (most recent call last):
      import numpy as np
ModuleNotFoundError: No module named 'numpy

The solution is to install numpy package. Run the below command in the terminal pointing to your project:

pip install numpy

The output will be like this from the terminal:

Collecting numpy
  Downloading numpy-1.23.3-cp310-cp310-macosx_11_0_arm64.whl (13.3 MB)
     |████████████████████████████████| 13.3 MB 12.4 MB/s            
Installing collected packages: numpy
Successfully installed numpy-1.23.3

Build the project again and the issue will be fixed.