win10下pip3安装tesserocr时报错

使用pip3在线安装tesserocr时报错,刚开始报错内容是提示未安装vs2014,安装完以后报错内容如下

ERROR: Command errored out with exit status 1:
     command: 'c:\users\administrator\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-v4ys64lr\\tesserocr\\setup.py'"'"'; __file__='"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-v4ys64lr\\tesserocr\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ADMINI~1\AppData\Local\Temp\pip-record-znybe2k0\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-v4ys64lr\tesserocr\
    Complete output (18 lines):
    C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-v4ys64lr\tesserocr\setup.py:134: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
      _LOGGER.warn('Failed to extract tesseract version from executable: {}'.format(e))
    Failed to extract tesseract version from executable: [WinError 2] 系统找不到指定的文件。
    Supporting tesseract v3.04.00
    Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_time_env': {'TESSERACT_VERSION': 50593792}}
    c:\users\administrator\appdata\local\programs\python\python37\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
    running install
    running build
    running build_ext
    building 'tesserocr' extension
    creating build
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\administrator\appdata\local\programs\python\python37\include -Ic:\users\administrator\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /EHsc /Tptesserocr.cpp /Fobuild\temp.win-amd64-3.7\Release\tesserocr.obj
    tesserocr.cpp
    c:\users\administrator\appdata\local\programs\python\python37\include\pyconfig.h(215): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\administrator\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-v4ys64lr\\tesserocr\\setup.py'"'"'; __file__='"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-v4ys64lr\\tesserocr\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ADMINI~1\AppData\Local\Temp\pip-record-znybe2k0\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

  目前没找到其他比较好的解决办法,只能下载离线包后手动pip3安装,

下载地址:https://github.com/simonflueckiger/tesserocr-windows_build/releases

 

你可能感兴趣的:(win10下pip3安装tesserocr时报错)