python-impala安装教程

环境:Mac 10.14.3, python 3.6
使用pip install,安装步骤如下:
(1) pip install six
(2) pip install bit_array
(3) pip install thriftpy
(4) pip install thrift_sasl == 0.2.1
(5) pip install impyla

其中,在安装第四步的时候报错如下:
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]
sasl/saslwrapper.cpp:249:10: fatal error: ‘string’ file not found
#include
^~~~~~~~
1 warning and 1 error generated.
error: command ‘gcc’ failed with exit status 1
----------------------------------------
ERROR: Command “/Users/sfeng/anaconda3/bin/python -u -c ‘import setuptools, tokenize;file=’”’"’/private/var/folders/q6/3_gw4_896pn8wp8zkmcgj5t80000gn/T/pip-install-xcm44ntt/sasl/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/q6/3_gw4_896pn8wp8zkmcgj5t80000gn/T/pip-record-ecbkx1qf/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/q6/3_gw4_896pn8wp8zkmcgj5t80000gn/T/pip-install-xcm44ntt/sasl/

解决方法为:
pip install git+https://github.com/JoshRosen/python-sasl.git@fix-build-with-newer-xcode
然后重新安装thrift_sasl即可。

参考:
python 安装impala包
如何使用Python Impyla客户端连接Hive和Impala
Pip install fails on OS X Mojave #15

你可能感兴趣的:(软件安装教程)