Search code examples
pythonpython-3.xpypdfanaconda3

No module named 'PyPDF2._codecs', even after already installed


I have installed PyPDF2==2.3.0, but I still get the error below when I import PyPDF2.

The error message is:

ModuleNotFoundError: No module named 'PyPDF2._codecs'


Solution

  • This issue was only present in the PyPI distribution of PyPDF2==2.3.0 for a couple of hours. It was fixed with release 2.3.1. See #1011 for more details

    I'm the maintainer of PyPDF2. I'm sorry I caused some headaches.

    You can update PyPDF2 via:

    pip install PyPDF2 --upgrade