Please refer to the same issue on GitHub: No module named 'PyPDF2' .
pypdf2 is deprecated, replaced by pypdf.
https://github.com/py-pdf/pypdf/issues/456#issuecomment-2071363332