学习刘硕先生的精通scrapy框架一书10章-10.3识别验证码 OCR验证的时候 用到tesseract-ocr
因使用的是wins+py3.7的版本,故适用于liunx下的pip install tesseract-ocr并不能完成完美的安装,
在我使用tesseract进行验证码识别的时候: 代码如下:
from PIL import Image
import pytesseract
img = Image.open('./code.png')
img = img.convert('L')
print(pytesseract.image_to_string(img))
错误提示如下:
Traceback (most recent call last):
File "C:\Users\19743\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pytesseract\pytesseract.py", line 184, in run_tesseract
proc = subprocess.Popen(cmd_args, **subprocess_args())
File "C:\Users\19743\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 769, in __init__
restore_signals, start_new_session)
File "C:\Users\19743\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 1172, in _execute_chil