码迷,mamicode.com
首页 > 其他好文 > 详细

安装tesserocr错误(未解决)

时间:2018-10-10 21:49:02      阅读:493      评论:0      收藏:0      [点我收藏+]

标签:imp   ror   for   rem   wrap   generic   错误   tis   files   

在 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(‘\r\n‘, ‘\n‘);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(‘\r\n‘, ‘\n‘);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(\r\n, \n);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/

报错

安装tesserocr错误(未解决)

标签:imp   ror   for   rem   wrap   generic   错误   tis   files   

原文地址:https://www.cnblogs.com/chengchengaqin/p/9768706.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!