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

本文详细记录了在使用pip安装tesserocr和pillow时遇到的错误,并提供了有效的解决方案,即通过直接下载并安装预编译的whl文件来避免编译过程中的依赖问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

通过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

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

评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值