簡體   English   中英

AttributeError: 模塊“ocrmypdf”沒有屬性“ocr”

[英]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 上使用以下命令安裝了這個庫,它的工作原理是:-

  1. apt install ocrmypdf

  2. pip3 install git+https://github.com/jbarlow83/OCRmyPDF.git

  3. pip3 install pluggy

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM