mac pip3 install tesserocr 超时 或者报错

报错如下:

 ERROR: Command errored out with exit status 1:
   command: /Users/yzchen/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_w/_62wz17d3zq1lwsv8cbrgrpm0000gn/T/pip-install-n2_smac6/tesserocr/setup.py'"'"'; __file__='"'"'/private/var/folders/_w/_62wz17d3zq1lwsv8cbrgrpm0000gn/T/pip-install-n2_smac6/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/_w/_62wz17d3zq1lwsv8cbrgrpm0000gn/T/pip-wheel-l6157p99 --python-tag cp37
       cwd: /private/var/folders/_w/_62wz17d3zq1lwsv8cbrgrpm0000gn/T/pip-install-n2_smac6/tesserocr/
  Complete output (15 lines):
  Supporting tesseract v4.1.0
  Configs from pkg-config: {'include_dirs': ['/usr/local/Cellar/leptonica/1.78.0/include', '/usr/local/Cellar/tesseract/4.1.0/include'], 'library_dirs': ['/usr/local/Cellar/tesseract/4.1.0/lib', '/usr/local/Cellar/leptonica/1.78.0/lib'], 'libraries': ['lept', 'tesseract'], 'cython_compile_time_env': {'TESSERACT_VERSION': 67174400}}
  running bdist_wheel
  running build
  running build_ext
  building 'tesserocr' extension
  creating build
  creating build/temp.macosx-10.7-x86_64-3.7
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yzchen/anaconda3/include -arch x86_64 -I/Users/yzchen/anaconda3/include -arch x86_64 -I/usr/local/Cellar/leptonica/1.78.0/include -I/usr/local/Cellar/tesseract/4.1.0/include -I/Users/yzchen/anaconda3/include/python3.7m -c tesserocr.cpp -o build/temp.macosx-10.7-x86_64-3.7/tesserocr.o -std=c++11 -DUSE_STD_NAMESPACE
  warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
  tesserocr.cpp:622:10: fatal error: 'ios' file not found
  #include "ios"
           ^~~~~
  1 warning and 1 error generated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: 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
    ERROR: Command errored out with exit status 1:
     command: /Users/yzchen/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_w/_62wz17d3zq1lwsv8cbrgrpm0000gn/T/pip-install-n2_smac6/tesserocr/setup.py'"'"'; __file__='"'"'/private/var/folders/_w/_62wz17d3zq1lwsv8cbrgrpm0000gn/T/pip-install-n2_smac6/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/_w/_62wz17d3zq1lwsv8cbrgrpm0000gn/T/pip-record-dd0zgahn/install-record.txt --single-version-externally-managed --compile
         cwd: /private/var/folders/_w/_62wz17d3zq1lwsv8cbrgrpm0000gn/T/pip-install-n2_smac6/tesserocr/
    Complete output (15 lines):
    Supporting tesseract v4.1.0
    Configs from pkg-config: {'include_dirs': ['/usr/local/Cellar/leptonica/1.78.0/include', '/usr/local/Cellar/tesseract/4.1.0/include'], 'library_dirs': ['/usr/local/Cellar/leptonica/1.78.0/lib', '/usr/local/Cellar/tesseract/4.1.0/lib'], 'libraries': ['lept', 'tesseract'], 'cython_compile_time_env': {'TESSERACT_VERSION': 67174400}}
    running install
    running build
    running build_ext
    building 'tesserocr' extension
    creating build
    creating build/temp.macosx-10.7-x86_64-3.7
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yzchen/anaconda3/include -arch x86_64 -I/Users/yzchen/anaconda3/include -arch x86_64 -I/usr/local/Cellar/leptonica/1.78.0/include -I/usr/local/Cellar/tesseract/4.1.0/include -I/Users/yzchen/anaconda3/include/python3.7m -c tesserocr.cpp -o build/temp.macosx-10.7-x86_64-3.7/tesserocr.o -std=c++11 -DUSE_STD_NAMESPACE
    warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    tesserocr.cpp:622:10: fatal error: 'ios' file not found
    #include "ios"
             ^~~~~
    1 warning and 1 error generated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/yzchen/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_w/_62wz17d3zq1lwsv8cbrgrpm0000gn/T/pip-install-n2_smac6/tesserocr/setup.py'"'"'; __file__='"'"'/private/var/folders/_w/_62wz17d3zq1lwsv8cbrgrpm0000gn/T/pip-install-n2_smac6/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/_w/_62wz17d3zq1lwsv8cbrgrpm0000gn/T/pip-record-dd0zgahn/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

或者超时

使用以下命令即可:

CC=clang XCC=clang++ CPPFLAGS="-stdlib=libc++ -DUSE_STD_NAMESPACE -mmacosx-version-min=10.8" pip3 install -i https://pypi.doubanio.com/simple/ tesserocr pillow
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值