본문 바로가기

카테고리 없음

TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.

TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information. 

 

만약 Tesseract를 설치하였음에도 불구하고 위 오류가 발생한다면 위 오류를 해결하기 위해 python 코드내에서 경로 설정이 필요합니다. Tesseract 설치 과정에서 우리는 설치 경로를 설정했습니다. 이미 설치를 완료하셨다면 다시 설치 과정을 확인하고 경로를 확인해야 합니다.

 

 

 

pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'
text = pytesseract.image_to_string(img1, lang='kor+eng')

 

위와 같이 경로를 설정해준다면 pytesseract가 tesseract가 설치된 경로를 찾아서 tesseract를 실행 가능하게 만들어줍니다. 만약 설치를 다른 경로에 해주었다면  r'C:\Program Files\Tesseract-OCR\tesseract.exe' 빨강색으로 작성된 곳을 설치한 경로로 변경해준다면 오류가 해결될 수 있습니다. 

 

만약 위와 같은 해결방법으로 문제가 해결되지 않는다면 사용하는 윈도우 bit를 확인하여 tesseract를 다시 설치하는 과정을 진행해야 합니다. 

 

감사합니다.