"no module named PyPDF2" error

ALisboa picture ALisboa · Aug 31, 2016 · Viewed 54.6k times · Source

I use Spyder, with Python 2.7, on a windows 10. I was able to install the PyPDF2 package with a conda command from my prompt. I said installation complete. Yet, If I try to run a simple import command:

import PyPDF2

I get the error:

ImportError: No module named PyPDF2

How can I fix this?

Answer

Ashutosh Chamoli picture Ashutosh Chamoli · Jan 20, 2018

In my case, I was trying to import 'pyPdf2' instead of 'PyPDF2'. Observe the case.

import PyPDF2

is correct.