[英]AttributeError: module 'ocrmypdf' has no attribute 'ocr'
我正在使用 ocrmypdf 庫將掃描的 pdf 轉換為可搜索的 pdf,但出現此錯誤。
這是我目前正在運行的代碼
import ocrmypdf
ocrmypdf.ocr('/content/drive/MyDrive/Dataset 2020/OCR/1081975.pdf', 'output.pdf')
錯誤 :-
AttributeError: module 'ocrmypdf' has no attribute 'ocr'
我在 google collab 上使用以下命令安裝了這個庫,它的工作原理是:-
apt install ocrmypdf
pip3 install git+https://github.com/jbarlow83/OCRmyPDF.git
pip3 install pluggy
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.