I am also facing an same error while installing tesseract in windows.
Based my recent problem solving i am following thsese below steps
Install tesseract using windows installer available in the gievn link: https://github.com/UB-Mannheim/tesseract/wiki
Note the tesseract path from the installation. Default installation path at the time of this edit was: C:\Users\USER\AppData\Local\Tesseract-OCR. It may change so please check the installation path.
After installations, still it is showing error or not installing error you are facing then press windows + R keys and run your file path (C:\Program Files\Tesseract-OCR\tesseract.exe) it wil work for me,
3. pip install pytesseract

Set the tesseract path in the script before calling ```image_to_string:``
For windows file path -
pytesseract.pytesseract.tesseract_cmd=r'C:\Program Files(x86)\Tesseract-OCR\tesseract.exe'
For installing opencv please - refer this question link
For linux installations
$ sudo apt install tesseract-ocr
$ sudo apt install libtesseract-dev
$ tesseract --version
2.After running this command, you should something like this:
tesseract 4.0.0-beta.1
leptonica-1.75.3
3.Once your tesseract installation is successful, you can run the following command to check
$ tesseract --list-langs
4.You can expect the following output:
List of available languages (2):
eng
osd
5.linux file path was given below
pytesseract.pytesseract.tesseract_cmd = r'home/user/bin/tesseract'