解决Mac安装tesserocr报错问题 Failed building wheel for

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

原文地址:https://www.cnblogs.com/jerryspace/p/9887255.html

时间: 2024-10-12 16:29:18

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

解决windows安装tesserocr报错问题 Failed building wheel for tesserocr

在我安装tesserocr的过程中出现了报错 C:\Users\Administrator>pip3 install tesserocr pillowCollecting tesserocr Using cached https://files.pythonhosted.org/packages/cf/0d/9e554f041962b8dd7acd978330535fed879452bb0af257c287ca4ae9c525/tesserocr-2.2.2.tar.gzRequirement

mac 安装mysql 报错“ERROR 2002 (HY000): Can not connect to local MySQL server through socket &#39;/tmp/mysql.sock&#39; (2)” 解决办法

首先安装 homebrew 再 brew install mysql 之后连接 mysql 无论是登录还是修改初始密码都会报如下的错误 ERROR 2002 (HY000): Can not connect to local MySQL server through socket '/tmp/mysql.sock' (2) 运行如下解决:参考 http://www.thinksaas.cn/group/topic/347978/ unset TMPDIR mysql_install_db --v

解决cron无法运行报错:FAILED

解决cron无法运行报错:FAILED to authorize user with PAM (Module is unknown) 查看cron运行日志tail -f /var/log/cron报如下错误: May 8 10:14:01 localhost crond[9399]: (root) FAILED to authorize user with PAM (Module is unknown) May 8 10:14:01 localhost crond[9400]: (root) F

安装Keras的问题:Failed building wheel for scipy

安装Keras的过程中出现了下边的问题: Failed building wheel for scipy, Failed cleaning build dir for scipy pip在windows下不工作. 处理办法: 手工下载Scipy: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy 手工安装,pip install scipyname 安装成功提示后,在继续安装Keras, pip install keras.

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

1.首先在pip3-install-mysqlclient时报错 mysql_config not found 2.逛了一些博客 让安装mysql或者mysql-connector-c 我安装了后者还是报错,现在报了这个错误 File "<string>", line 1, in <module> File "/private/var/folders/2f/r1pwfcp521q7z9kd240tr3700000gn/T/pip-build-u8yhU

docker安装完报错:Failed to start docker.service: Unit docker.service is masked

执行 systemctl start docker 报错 Failed to start docker.service: Unit docker.service is masked. 解决 systemctl unmask docker.service systemctl unmask docker.socket systemctl start docker.service 原文地址:https://www.cnblogs.com/chenqionghe/p/11478863.html

MAC 安装psycopg2报错ld: library not found for -lssl

pip3 install psycopg2 报错:ld: library not found for -lssl 解决参考:https://github.com/PyMySQL/mysqlclient-python/issues/169 安装前定义这两个环境变量就好了 export LDFLAGS="-L/usr/local/opt/openssl/lib" export CPPFLAGS="-I/usr/local/opt/openssl/include" 原文地

mac安装mysql报错ERROR 1045 (28000): Access denied for.

安装完后,mysql -h localhost -u root -p 时候报错,ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)第一步:删除 /usr/local/mysql/data/ 下的 ib_logfile0和ib_logfile1文件.第二步:在系统偏好设置中停止Mysql服务第三步:cd /usr/local/mysql/bin/执行 ./mysqld_safe --

mac安装html5lib报错

pip安装html5lib包的时候报一下错误: ?  /test sudo  pip install html5lib The directory '/Users/lele/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that d