728x90
반응형
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/pdf2image/pdf2image.py", line 441, in pdfinfo_from_path
proc = Popen(command, env=env, stdout=PIPE, stderr=PIPE)
File "/opt/conda/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/opt/conda/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'pdfinfo'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "layout_parser.py", line 5, in <module>
pdf_layout, pdf_images = lp.load_pdf("./test.pdf", load_images=True)
File "/opt/conda/lib/python3.8/site-packages/layoutparser/io/pdf.py", line 205, in load_pdf
pdf_images = pdf2image.convert_from_path(filename, dpi=dpi)
File "/opt/conda/lib/python3.8/site-packages/pdf2image/pdf2image.py", line 97, in convert_from_path
page_count = pdfinfo_from_path(pdf_path, userpw, poppler_path=poppler_path)["Pages"]
File "/opt/conda/lib/python3.8/site-packages/pdf2image/pdf2image.py", line 467, in pdfinfo_from_path
raise PDFInfoNotInstalledError(
pdf2image.exceptions.PDFInfoNotInstalledError: Unable to get page count. Is poppler installed and in PATH?
# Ubuntu
sudo apt-get install poppler-utils
# Anaconda 환경
conda install -c conda-forge poppler
728x90
반응형
'사소한 Tip . 오류 해결법' 카테고리의 다른 글
Ubuntu Disk 남은 용량 (0) | 2022.01.12 |
---|---|
pdf to HTML (0) | 2022.01.11 |
rm -r command with answer "yes to all" (0) | 2022.01.04 |
[Git] git command (0) | 2021.12.29 |
[MMOCR] 사용방법 (0) | 2021.12.14 |