This is my code and I get this error
ModuleNotFoundError: No module named 'pyPDF2'
.
I've already installed with pip instal pyPDF2
.
If I try it again it says:
C:\Users\nicks\Desktop\Coding Projects\Python\Pdf to Audio›pip install PyPDF2
Requirement already satisfied: PyPDF2 in c: \users\nicks\appdata\local\packages \pythonsoftwarefoundation.python.3.9 qbz5n2kfra8p@\localcache\local
-packages \python39 \site-packages (1.26.0)
import pyPDF2
pdf = open('material.pdf','rb')
pdfReader = pyPDF2.PdFileReader(pdf)
speaker = pyttsx3.init()
speaker.say(pdf)
speaker.save_to_file(string, 'material.mp3')
speaker.runAndWait
I use Python 3.9.10.