Python Section 11-9 Working with PDFs: import PyPDF2


Could anyone help? This error has been happening to me quite a few times on different imports, and I am a bit confused. This is the error I see:

I imported PyPDF2 and also used pipenv and changed the Python interpreter, but it’s not working. It says that there is no module named PyPDF2. I feel like I might have missed out something crucial that Mosh has said since this error keeps happening in different projects. Can anyone help?


This happen because coderunner extension doesn’t the virtual environment.
so you will have to change the coderunner extension so it runs the virtual environment.
Don’t worry Mosh will show you how in the next couple of videos.

For now you can run your code using the terminal but you have to activate the virtual environment.

1 Like

@jan how do you put the pdf files