pip installs Python libraries and lets you request a specific package version when the newest release is incompatible with existing code. section 9.4.2
Pinning a compatible version
When code uses an API removed from PyPDF2 3.0.0, run pip install "PyPDF2 < 3.0.0". pip replaces the installed 3.0.1 release with 2.12.1, allowing the program to run without immediately rewriting it. section 9.4.2
Use pip during practical troubleshooting:
- Install a library with pip install PyPDF2. section 9.4.2
- Try another library when version changes or removed functions make the first option unsuitable; PyMuPDF is one alternative. section 9.4.2
Collecting PyPDF2<3.0.0
Installing collected packages: PyPDF2
Attempting uninstall: PyPDF2
Found existing installation: PyPDF2 3.0.1 #1
Uninstalling PyPDF2-3.0.1: #2
Successfully uninstalled PyPDF2-3.0.1
Successfully installed PyPDF2-2.12.1 #3
Inspect the installation output to verify which version pip removed and which version it installed. section 9.4.2


