from pdfminer.pdfparser import PDFParser, PDFDocument from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter from pdfminer.pdfdevice import PDFDevice ImportError: cannot import name PDFDocument
解决方法
from pdfminer.pdfparser import PDFParser
from pdfminer.pdfdocument import PDFDocument
from pdfminer.pdfpage import PDFPage
from pdfminer.pdfpage import PDFTextExtractionNotAllowed
Been thinking about it for days! It may be that the pdfminer3k package is placed in a different location, and the import statement can be modified!
-------------------------------
by Mr. Wu Qian
kiranchen UIBE 20180427