There are several ways to install PyPDF2. The most common option is to use pip.
PyPDF2 requires Python 3.6+ to run.
Typically Python comes with
pip, a package installer. Using it you can
pip install PyPDF2
If you are not a super-user (a system adminstrator / root), you can also just install PyPDF2 for your current user:
pip install --user PyPDF2
Anaconda users can install PyPDF2 via conda-forge.
In case you want to use the current version under development:
pip install git+https://github.com/py-pdf/PyPDF2.git