zoukankan      html  css  js  c++  java
  • 安装tesserocr错误(未解决)

    在 Mac下,我们首先使用 Homebrew安装 ImageMagick和 tesseract库 :

    brew install imagemagick
    brew install tesseract --all-languages

    接下来再安装 tesserocr即可:

    pip3 install tesserocr pillow

    Collecting tesserocr
      Using cached https://files.pythonhosted.org/packages/f8/6d/4e81e041f33a4419e59edcb1dbdf3c56e9393f60f5ef531381bd67a1339b/tesserocr-2.3.1.tar.gz
    Requirement already satisfied: pillow in ./anaconda3/lib/python3.6/site-packages (5.1.0)
    Building wheels for collected packages: tesserocr
      Running setup.py bdist_wheel for tesserocr ... error
      Complete output from command /Users/zhengcheng/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/dm/_lrrz5tx14l7bl9qcgcbb8hh0000gn/T/pip-install-y4ggr5um/tesserocr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
    ', '
    ');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/dm/_lrrz5tx14l7bl9qcgcbb8hh0000gn/T/pip-wheel-hz580ef_ --python-tag cp36:
      Supporting tesseract v3.05.02
      Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_time_env': {'TESSERACT_VERSION': 197890}}
      /Users/zhengcheng/anaconda3/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
        warnings.warn(msg)
      running bdist_wheel
      running build
      running build_ext
      building 'tesserocr' extension
      creating build
      creating build/temp.macosx-10.7-x86_64-3.6
      gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/zhengcheng/anaconda3/include -arch x86_64 -I/Users/zhengcheng/anaconda3/include -arch x86_64 -I/Users/zhengcheng/anaconda3/include/python3.6m -c tesserocr.cpp -o build/temp.macosx-10.7-x86_64-3.6/tesserocr.o -std=c++11 -DUSE_STD_NAMESPACE
      In file included from tesserocr.cpp:603:
      In file included from /usr/local/include/tesseract/genericvector.h:27:
      In file included from /usr/local/include/tesseract/tesscallback.h:22:
      /usr/local/include/tesseract/host.h:28:10: fatal error: 'cstdint' file not found
      #include <cstdint>      // int32_t, ...
               ^~~~~~~~~
      1 error generated.
      error: command 'gcc' failed with exit status 1
      
      ----------------------------------------
      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
        Complete output from command /Users/zhengcheng/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/dm/_lrrz5tx14l7bl9qcgcbb8hh0000gn/T/pip-install-y4ggr5um/tesserocr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
    ', '
    ');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/dm/_lrrz5tx14l7bl9qcgcbb8hh0000gn/T/pip-record-beutjg17/install-record.txt --single-version-externally-managed --compile:
        Supporting tesseract v3.05.02
        Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_time_env': {'TESSERACT_VERSION': 197890}}
        /Users/zhengcheng/anaconda3/lib/python3.6/distutils/dist.py:261: 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.macosx-10.7-x86_64-3.6
        gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/zhengcheng/anaconda3/include -arch x86_64 -I/Users/zhengcheng/anaconda3/include -arch x86_64 -I/Users/zhengcheng/anaconda3/include/python3.6m -c tesserocr.cpp -o build/temp.macosx-10.7-x86_64-3.6/tesserocr.o -std=c++11 -DUSE_STD_NAMESPACE
        In file included from tesserocr.cpp:603:
        In file included from /usr/local/include/tesseract/genericvector.h:27:
        In file included from /usr/local/include/tesseract/tesscallback.h:22:
        /usr/local/include/tesseract/host.h:28:10: fatal error: 'cstdint' file not found
        #include <cstdint>      // int32_t, ...
                 ^~~~~~~~~
        1 error generated.
        error: command 'gcc' failed with exit status 1
        
        ----------------------------------------
    Command "/Users/zhengcheng/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/dm/_lrrz5tx14l7bl9qcgcbb8hh0000gn/T/pip-install-y4ggr5um/tesserocr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
    ', '
    ');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/dm/_lrrz5tx14l7bl9qcgcbb8hh0000gn/T/pip-record-beutjg17/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/dm/_lrrz5tx14l7bl9qcgcbb8hh0000gn/T/pip-install-y4ggr5um/tesserocr/

    报错

  • 相关阅读:
    wxpython自定义按钮
    wxPython修改文本框颜色
    strcat函数
    fopen作用
    Less 语法快速入门
    Echarts构建图表
    伪数组
    MVC,MVP,MVVM基本原理
    VUE常见指令
    Apply,Call,bind对比
  • 原文地址:https://www.cnblogs.com/chengchengaqin/p/9768706.html
Copyright © 2011-2022 走看看