zoukankan      html  css  js  c++  java
  • 关于在 mac上配置pytesseract的相关问题

    因为踩了两个小时坑 特别是在配置依赖tesseract-ORC识别库时候的问题 特别麻烦

    一定要用brewhome 一定要用brewhome 一定要用brewhome

    重要的事情说三遍。

    刚开始我在网上查了一下依赖的关系,觉得不是很难 然后 去下载源码下来编译 各种出问题。最后也没能解决,

    所以推荐盆友们还是 使用 brewhome来安装吧 稍微方便一点。

    要安装的 是这些玩意儿。

    autoconf    jpeg        libpng        libtool
    automake    leptonica    libtiff        tesseract

    特别注意  在安装tesseract之前 要先安装leptonica

    使用brewhome是比较方便的 直接使用命令

    brew install leptonic

    就可以了

    最后安装tesseract 使用命令

    brew install tesseract

    这时候会出现这个报错

    Error: You must `brew link leptonica' before tesseract can be installed

    然后使用命令 

    brew link tesseract

    又会报错。。。

    rror: Could not symlink bin/convertfilestopdf
    Target /usr/local/bin/convertfilestopdf
    already exists. You may want to remove it:
      rm '/usr/local/bin/convertfilestopdf'
    
    To force the link and overwrite all conflicting files:
      brew link --overwrite leptonica
    
    To list all files that would be deleted:
      brew link --overwrite --dry-run leptonica

    这里按照提示来  有好几个选择 我直接使用的 link 强制覆盖操作

    brew link --overwrite leptonica

    然后 再重新执行

    brew install tesseract

    就可以安装成功啦

    其实配置这些 只是 为了安装python的 pytesseract模块的支持。 python在使用这个模块的时候 还需要PIL库的支持,这里我就不赘述了。。大家自己再去找别的资料吧 反正最麻烦的 绝对是pytesseract-orc这个模块,其他的应该都可以使用pip install解决。

    
    
  • 相关阅读:
    eclipse里报:An internal error occurred during: "Building workspace". Java heap space
    bootstrap字体图标不显示的问题解决
    @PathVariable和@RequestParam的区别
    String Date Calendar之间的转换
    java多种方式解析json字符串
    PHP中empty、isset和is_null的使用区别
    C中atoi和strcpy的自定义实现
    【2014-08-23】Beyong Coding
    算法时间复杂度求解法【详细过程说明】
    #查找算法#【2】二叉排序树
  • 原文地址:https://www.cnblogs.com/piperck/p/4966464.html
Copyright © 2011-2022 走看看