Python “有时发生”;tesseract未安装或不在您的路径中;

Python “有时发生”;tesseract未安装或不在您的路径中;,python,python-2.7,tesseract,python-tesseract,Python,Python 2.7,Tesseract,Python Tesseract,我在脚本的while循环中使用了tesseract。但有时(每天一次)我会犯这样的错误。Tesseract已经安装并开始工作,但我每天都会收到一条消息。如何解决 Traceback: File file.py, line 169, in <module> results.append(pytesseract.image_to_string(im)) File /usr/local/lib/python2.7/dist-packages/pytesseract/pytesseract.

我在脚本的while循环中使用了tesseract。但有时(每天一次)我会犯这样的错误。Tesseract已经安装并开始工作,但我每天都会收到一条消息。如何解决

Traceback:
File file.py, line 169, in <module> results.append(pytesseract.image_to_string(im))
File /usr/local/lib/python2.7/dist-packages/pytesseract/pytesseract.py, line 286, in image_to_string
return run_and_get_output(image, 'txt', lang, config, nice)
File /usr/local/lib/python2.7/dist-packages/pytesseract/pytesseract.py, line 201, in run_and_get_output
   raise TesseractNotFoundError()
pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path
一旦我启动脚本,tesseract就会工作,但突然(通常每天一次,有时是第二天)tesseract返回“tesseract未安装或不在您的路径中”。当我再次启动脚本时,它会再次正常工作

怎么了

tesseract 3.04.01
 leptonica-1.74.1
  libgif 5.1.4 : libjpeg 6b (libjpeg-turbo 1.5.1) : libpng 1.6.28 : libtiff 4.0.8 : zlib 1.2.8 : libwebp 0.5.2 : libopenjp2 2.1.2