用python学习爬虫时的环境配置

系统:WIN10 软件:python3.10
在cmd命令行中pip3 install tesserocr pillow进行安装,老是报如下的同样的错误,希望能有资深专家帮忙提供解决方法
C:\Users\Administrator>pip3 install tesserocr
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
╰─> [27 lines of output]
Supporting tesseract v3.05.01
Tesseract major version 3
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Temp\pip-install-uma5xjnk\tesserocr_3f4bbdf8ceb740099242fdc19f630296\setup.py", line 243, in get_build_args
build_args = package_config()
File "C:\Users\Administrator\AppData\Local\Temp\pip-install-uma5xjnk\tesserocr_3f4bbdf8ceb740099242fdc19f630296\setup.py", line 99, in package_config
p = subprocess.Popen(
File "D:\zixue\gongju\python\lujing\lib\subprocess.py", line 969, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "D:\zixue\gongju\python\lujing\lib\subprocess.py", line 1438, 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 "", line 2, in <module>
    File "", line 34, in <module>
    File "C:\Users\Administrator\AppData\Local\Temp\pip-install-uma5xjnk\tesserocr_3f4bbdf8ceb740099242fdc19f630296\setup.py", line 327, in <module>
      ext_modules=[make_extension()],
    File "C:\Users\Administrator\AppData\Local\Temp\pip-install-uma5xjnk\tesserocr_3f4bbdf8ceb740099242fdc19f630296\setup.py", line 260, in make_extension
      build_args = get_build_args()
    File "C:\Users\Administrator\AppData\Local\Temp\pip-install-uma5xjnk\tesserocr_3f4bbdf8ceb740099242fdc19f630296\setup.py", line 252, in get_build_args
      build_args = get_tesseract_version()
    File "C:\Users\Administrator\AppData\Local\Temp\pip-install-uma5xjnk\tesserocr_3f4bbdf8ceb740099242fdc19f630296\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.

别安装tesserocr吧,用pytesseract好了

你是要安装包吗?可以使用国内源:
pip install -i 国内源

看下这篇博客,也许你就懂了,链接:python网络爬虫学习的汇总