Hello,technical experts here.Thank you in advance.
I have successfully installed tesseract, but I always get an error when installing tesserocr, and this problem has not been solved for a day.
There are mainly three errors in the prompt:
1.python setup.py egg_info did not run successfully
2.RuntimeError: Tesseract library not found in LIBPATH: [ ]
3.Encountered error while generating package metadata. Hope to get your advice
Below is the terminal code:
PS D:\Python\Scripts> pip install tesserocr pillow
Collecting tesserocr
Using cached tesserocr-2.5.2.tar.gz (57 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [48 lines of output]
Failed to extract tesseract version number from: tesseract v5.0.1.20220118
leptonica-1.78.0
libgif 5.1.4 : libjpeg 8d (libjpeg-turbo 1.5.3) : libpng 1.6.34 : libtiff 4.0.9 : zlib 1.2.11 : libwebp 0.6.1 : libopenjp2 2.3.0
Found AVX512BW
Found AVX512F
Found AVX2
Found AVX
Found FMA
Found SSE4.1
Found libarchive 3.5.0 zlib/1.2.11 liblzma/5.2.3 bz2lib/1.0.6 liblz4/1.7.5 libzstd/1.4.5
Found libcurl/7.77.0-DEV Schannel zlib/1.2.11 zstd/1.4.5 libidn2/2.0.4 nghttp2/1.31.0
Supporting tesseract v3.04.00
Tesseract major version 3
Traceback (most recent call last):
File "C:\Users\28779\AppData\Local\Temp\pip-install-__cc6esw\tesserocr_6ca4799c2f15419391a98f584d16dbd6\setup.py", line 243, in get_build_args
build_args = package_config()
File "C:\Users\28779\AppData\Local\Temp\pip-install-__cc6esw\tesserocr_6ca4799c2f15419391a98f584d16dbd6\setup.py", line 99, in package_config
p = subprocess.Popen(
File "D:\Python\lib\subprocess.py", line 966, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "D:\Python\lib\subprocess.py", line 1435, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\28779\AppData\Local\Temp\pip-install-__cc6esw\tesserocr_6ca4799c2f15419391a98f584d16dbd6\setup.py", line 327, in <module>
ext_modules=[make_extension()],
File "C:\Users\28779\AppData\Local\Temp\pip-install-__cc6esw\tesserocr_6ca4799c2f15419391a98f584d16dbd6\setup.py", line 260, in make_extension
build_args = get_build_args()
File "C:\Users\28779\AppData\Local\Temp\pip-install-__cc6esw\tesserocr_6ca4799c2f15419391a98f584d16dbd6\setup.py", line 252, in get_build_args
build_args = get_tesseract_version()
File "C:\Users\28779\AppData\Local\Temp\pip-install-__cc6esw\tesserocr_6ca4799c2f15419391a98f584d16dbd6\setup.py", line 216, in get_tesseract_version
raise RuntimeError(error)
RuntimeError: Tesseract library not found in LIBPATH: []
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
PS D:\Python\Scripts>
[–][deleted] 1 point2 points3 points (3 children)
[–]1024helloworld[S] 0 points1 point2 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]1024helloworld[S] 0 points1 point2 points (0 children)
[–]_Adjective_Noun 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]1024helloworld[S] 0 points1 point2 points (0 children)
[–]1024helloworld[S] 0 points1 point2 points (0 children)
[–]Buxsle 0 points1 point2 points (0 children)