安装完成后出现权限被拒绝错误,有解决方案吗?

-1 投票
0 回答
24 浏览
提问于 2025-04-12 02:46

代码

import cv2
import pytesseract
 
pytesseract.pytesseract.tesseract_cmd = '/Users/navroop/Desktop/text reco/tesseract'
img = cv2.imread("car.png")

PermissionError                           Traceback (most recent call last)
Cell In[13], line 58
     55 file = open("recognized.txt", "a")
     57 # Apply OCR on the cropped image
---> 58 text = pytesseract.image_to_string(cropped)
     60 # Appending the text into file
     61 file.write(text)

PermissionError: [Errno 13] Permission denied: '/Users/navroop/Desktop/text reco/tesseract'
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

我试着克隆了tesseract的代码库,然后提到下载的文件路径,并用它来从一个png文件中提取图像。

0 个回答

暂无回答

撰写回答