【python】win10安装Tesserocr失败解决方法

通过pip install tesserocr pillow 安装tesserocr失败

报错如下:

C:\Users\Administrator>pip install tesserocr pillow
  Failed building wheel for tesserocr
  Running setup.py clean for tesserocr
Failed to build tesserocr
Installing collected packages: tesserocr
  Running setup.py install for tesserocr ... error

    ........(部分信息省略)
      warnings.warn(msg)
    running install
    running build
    running build_ext
    building 'tesserocr' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

    ----------------------------------------
Command "d:\python3\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-fa810tiw\\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-g7y85190\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in 

解决方法如下:

直接下载whl文件,然后进入文件存放的文件夹,打开cmd进行安装即可

C:\Users\Administrator\Desktop>pip install tesserocr-2.2.2-cp36-cp36m-win_amd64.whl
Processing c:\users\administrator\desktop\tesserocr-2.2.2-cp36-cp36m-win_amd64.whl
Installing collected packages: tesserocr
Successfully installed tesserocr-2.2.2

whl文件下载链接:https://github.com/simonflueckiger/tesserocr-windows_build/releases

如果对您有所帮助,请给我一个大大的赞哦!

猜你喜欢

转载自blog.csdn.net/lm3758/article/details/82894667