就简单写入
import pdfplumber import pandas as pd with pdfplumber.open("1.pdf") as pdf: print(pdf.metadata)
然后就炸了
C:\Users\l7790\AppData\Local\Programs\Python\Python37\python.exe E:/py/zhauqu.py
Traceback (most recent call last):
File "C:\Users\l7790\AppData\Local\Programs\Python\Python37\lib\site-packages\pdfminer\image.py", line 8, in <module>
from typing import Literal
ImportError: cannot import name 'Literal' from 'typing' (C:\Users\l7790\AppData\Local\Programs\Python\Python37\lib\typing.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:/py/zhauqu.py", line 1, in <module>
import pdfplumber
File "C:\Users\l7790\AppData\Local\Programs\Python\Python37\lib\site-packages\pdfplumber\__init__.py", line 14, in <module>
from .pdf import PDF
Fi