-5

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'

Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
Guy
  • 21
  • 3
  • 2
    THIS IS NOT A DUPLICATE. This question reflects a bug in PyPDF2 v2.3.0, fixed in 2.3.1. See https://github.com/py-pdf/PyPDF2/releases/tag/2.3.1. PLEASE REOPEN – N1ngu Jun 20 '22 at 09:38
  • 3
    Follow-up https://meta.stackoverflow.com/questions/418814/request-to-reopen-question – N1ngu Jun 20 '22 at 17:45
  • Can you please [edit] the question to provide a [mre]? In specific, a traceback would be needed to clarify whether this is due to an internal problem of the library or an external problem of the code/environment. – MisterMiyagi Jun 22 '22 at 13:52

2 Answers2

2

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
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
-1

SOLVED! I faced the same problem. I installed used pip3, pip everything. But successfully running after installing from below command:

pipenv install PyPDF2