localhost:~ jerry$ Processing /var/www/git/python/tesserocr

-bash: Processing: command not found

localhost:~ jerry$ pip3 install tesserocr

Collecting tesserocr

Using cached https://files.pythonhosted.org/packages/f8/6d/4e81e041f33a4419e59edcb1dbdf3c56e9393f60f5ef531381bd67a1339b/tesserocr-2.3.1.tar.gz

Building wheels for collected packages: tesserocr

Running setup.py bdist_wheel for tesserocr ... error

Complete output from command /anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/b_/dgk5x9dx6bx69rhw7v6dhgtw0000gn/T/pip-install-v4ek5yfd/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/b_/dgk5x9dx6bx69rhw7v6dhgtw0000gn/T/pip-wheel-u4i9uj2o --python-tag cp37:

/private/var/folders/b_/dgk5x9dx6bx69rhw7v6dhgtw0000gn/T/pip-install-v4ek5yfd/tesserocr/setup.py:132: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead

_LOGGER.warn('pkg-config failed to find tesseract/lept libraries: {}'.format(e))

pkg-config failed to find tesseract/lept libraries: b"Package tesseract was not found in the pkg-config search path.\nPerhaps you should add the directory containing `tesseract.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'tesseract' found\n"

Supporting tesseract v4.0.0

Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_time_env': {'TESSERACT_VERSION': 262144}}

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/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64 -I/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 '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]

In file included from tesserocr.cpp:603:

/usr/local/include/tesseract/unichar.h:24:10: fatal error: 'cstring' file not found

#include <cstring>

^~~~~~~~~

1 warning and 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 /anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/b_/dgk5x9dx6bx69rhw7v6dhgtw0000gn/T/pip-install-v4ek5yfd/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/b_/dgk5x9dx6bx69rhw7v6dhgtw0000gn/T/pip-record-1cw_w_lk/install-record.txt --single-version-externally-managed --compile:

/private/var/folders/b_/dgk5x9dx6bx69rhw7v6dhgtw0000gn/T/pip-install-v4ek5yfd/tesserocr/setup.py:132: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead

_LOGGER.warn('pkg-config failed to find tesseract/lept libraries: {}'.format(e))

pkg-config failed to find tesseract/lept libraries: b"Package tesseract was not found in the pkg-config search path.\nPerhaps you should add the directory containing `tesseract.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'tesseract' found\n"

Supporting tesseract v4.0.0

Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_time_env': {'TESSERACT_VERSION': 262144}}

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/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64 -I/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 '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]

In file included from tesserocr.cpp:603:

/usr/local/include/tesseract/unichar.h:24:10: fatal error: 'cstring' file not found

#include <cstring>

^~~~~~~~~

1 warning and 1 error generated.

error: command 'gcc' failed with exit status 1

----------------------------------------

Command "/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/b_/dgk5x9dx6bx69rhw7v6dhgtw0000gn/T/pip-install-v4ek5yfd/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/b_/dgk5x9dx6bx69rhw7v6dhgtw0000gn/T/pip-record-1cw_w_lk/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/b_/dgk5x9dx6bx69rhw7v6dhgtw0000gn/T/pip-install-v4ek5yfd/tesserocr/

看了下网上的搜索结果,发现原来是我安装了Anaconda的原因。同时,也找到了解决方法

conda install -c simonflueckiger tesserocr

查了下conda install 发现conda是针对于python的。可以安装minconda或anaconda进行安装。所以在安装了Anaconda的条件下,我们可以通过conda install安装tesserocr

参考链接地址:http://mkd.pub/chl434723646/415732_22875257.html

解决Mac安装tesserocr报错问题 Failed building wheel for的更多相关文章

  1. Mac安装MySQL-python报错解决

    Mac安装MySQL-pyhton报错 今天在Mac上安装MySQL-python报错,搜遍网络都说什么mysql config路径问题,但是都不行. 解决方案 一开始遇到的问题是: Complete ...

  2. 解决vue安装less报错Failed to compile with 1 errors的问题

    1.创建vue项目后安装less,执行 npm install less less-loader --save-dev 下载版本为:less-loader@6.1.0 , less@3.11.3,重启 ...

  3. 解决mac安装homebrew后报错-bash: brew: command not found

    解决mac安装homebrew后报错-bash: brew: command not found     参照官网上很简单的一句安装命令, /usr/bin/ruby -e "$(curl ...

  4. Mac安装MAT报错问题

    安装mat报错,提示在/.eclipse/1528649425_macosx_cocoa_x86_64/configuration/1539332382530.log路径下查看错误日志, 原因是/pr ...

  5. Python安装scrapy过程中出现“Failed building wheel for xxx”

    https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml Python安装scrapy库过程中出现“ Failed building wheel for xxx ...

  6. mac 安装homobrew 报错解决

    按照官网(https://brew.sh/index_zh-cn.html)给的命令:     /usr/bin/ruby -e "$(curl -fsSL https://raw.gith ...

  7. 关于mac安装rails报错clang: error: unknown argument

    文章都是从我的个人博客上转载过来的,大家可以点击我的个人博客. www.iwangzheng.com mac上安装rails的时候报错, 安装rails的在终端执行了一句命令: $sudo gem i ...

  8. Linux下安装vim-plug报错:Failed to connect to raw.githubusercontent.com port 443: Connection refused

    安装vim-plug时,输入以下命令: curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.c ...

  9. 【Django】Mac 安装pip3-install-mysqlclient 报错

    1.首先在pip3-install-mysqlclient时报错 mysql_config not found 2.逛了一些博客 让安装mysql或者mysql-connector-c 我安装了后者还 ...

随机推荐

  1. TypeScript中是使用强类型函数作为参数

    class Foo { save(callback: (n: number) => any) : void { callback(42) } multipleCallbacks(firstCal ...

  2. 固定定位下的div水平居中

    发现了一个之前未留意的知识点,做个笔记. 当一个块级元素的父元素开启了flex布局后,我们可以很轻松的将这个元素居中对齐,可以在父元素上加 justify-content: center; align ...

  3. bluetooth(蓝牙) AVRCP协议概念及代码流程解析

    一 概念 AVRCP全称:The Audio/Video Remote Control Profile (AVRCP) 翻译成中文就是:音视频远程控制协议.概念:AVRCP定义了蓝牙设备之间的音视频传 ...

  4. OPC—— KepServer.ServerState返回值为3和OPCConfig.exe配置文件的根目录

    做开发没有对电脑的绝对管理员权限的问题,会出现很多意外,调试OPC是总是连接状态有时莫明返回3,提示 not configuration,问题在于: 没有以管理员权限运行OPCConfig.exe,导 ...

  5. tomcat 中无法添加项目等问题的解决方案

    博客地址:http://www.moonxy.com 一.前言 今天新建了一个 maven 项目,添加程序文件之后,发现无法添加项目,然后修改配置,将应用添加到了 tomcat,启动时又报错,解决出现 ...

  6. 第1次作业-Numpy练习

    1.创建一个边界值为1而内部都是0的数组,图例如下:[提示:]解此题可以先把所有值都设置为1,这是大正方形:其次,把边界除外小正方形全部设置为0.本题用到numpy的切片原理.多维数组同样遵循x[st ...

  7. go语言 链表练习

    package main import "fmt" //定义节点 type Node struct { Data int Next *Node } /* * 返回第一个节点 * h ...

  8. elasticsearch集群扩容和容灾

    elasticsearch专栏:https://www.cnblogs.com/hello-shf/category/1550315.html 一.集群健康 Elasticsearch 的集群监控信息 ...

  9. PyCharm设置自己的默认模板

    1.File-Settings 2.Editor- Code Style - File and Code Templates - Python Script 需要设置什么内容,现在就可以写入了,相关变 ...

  10. dom4j.jar下载

    下载地址: 链接:https://pan.baidu.com/s/16GCgCpaF7dc33pMbK2sTLg 密码:z444