I hope it's okay to "self-answer". So I also posted this question in the GPAW mailing list and one of the users in the mailing list who go by the handle mazay0 offered a different means of installing gpaw as follows:
!apt install python3-mpi4py cython3 libxc-dev gpaw-data
!pip -q install gpaw pymatgen==2019.12.22
This one worked. Although, I still don't have any idea why this one works while the shorter way doesn't. I'm not really good with bash commands (Maybe someone can explain(?)).
As per the comment above, it seems other people have also stumbled on this problem. The code snippet above seemed to do the trick in my case.