pip install pdf2image
sudo apt-get install poppler-utils
from pdf2image import convert_from_path
pdf_path = "2.pdf"
images = convert_from_path(pdf_path)
print(1)
from pdf2image import convert_from_path
pdf_path = "2.pdf"
images = convert_from_path(pdf_path)
print(1)