为了从 python 连接到 Hive 数据仓库。使用 pyhive 需要 sasl - ModuleNotFoundError: No module named 'sasl'
安装 sasl 失败并出现以下错误
Python 3.9.4 安装了 gcc、libsasl2
MACOS 莫哈韦 v 10.14
pip3 安装 sasl
Collecting sasl
Using cached sasl-0.2.1.tar.gz (30 kB)
Requirement already satisfied: six in /usr/local/lib/python3.9/site-packages (from sasl) (1.15.0)
Building wheels for collected packages: sasl
Building wheel for sasl (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python@3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7l/zbp16k6s11v5rypxj86mq_z00000gn/T/pip-install-3a1mge3r/sasl_ebeeb9cd2f6b4067a93195d45bbf68c1/setup.py'"'"'; __file__='"'"'/private/var/folders/7l/zbp16k6s11v5rypxj86mq_z00000gn/T/pip-install-3a1mge3r/sasl_ebeeb9cd2f6b4067a93195d45bbf68c1/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/7l/zbp16k6s11v5rypxj86mq_z00000gn/T/pip-wheel-r3vsh0mm
cwd: /private/var/folders/7l/zbp16k6s11v5rypxj86mq_z00000gn/T/pip-install-3a1mge3r/sasl_ebeeb9cd2f6b4067a93195d45bbf68c1/
Complete output (333 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-3.9
creating build/lib.macosx-10.14-x86_64-3.9/sasl
copying sasl/__init__.py -> build/lib.macosx-10.14-x86_64-3.9/sasl
running egg_info
writing sasl.egg-info/PKG-INFO
writing dependency_links to sasl.egg-info/dependency_links.txt
writing requirements to sasl.egg-info/requires.txt
writing top-level names to sasl.egg-info/top_level.txt
reading manifest file 'sasl.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'sasl.egg-info/SOURCES.txt'
copying sasl/saslwrapper.cpp -> build/lib.macosx-10.14-x86_64-3.9/sasl
copying sasl/saslwrapper.h -> build/lib.macosx-10.14-x86_64-3.9/sasl
copying sasl/saslwrapper.pyx -> build/lib.macosx-10.14-x86_64-3.9/sasl
running build_ext
building 'sasl.saslwrapper' extension
creating build/temp.macosx-10.14-x86_64-3.9
creating build/temp.macosx-10.14-x86_64-3.9/sasl
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Isasl -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c sasl/saslwrapper.cpp -o build/temp.macosx-10.14-x86_64-3.9/sasl/saslwrapper.o
In file included from sasl/saslwrapper.cpp:254:
sasl/saslwrapper.h:36:35: warning: 'sasl_dispose' is deprecated: first deprecated in macOS 10.11 [-Wdeprecated-declarations]
~ClientImpl() { if (conn) sasl_dispose(&conn); conn = 0; }
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sasl/sasl.h:746:18: note: 'sasl_dispose' has been explicitly marked deprecated here
LIBSASL_API void sasl_dispose(sasl_conn_t **pconn) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_11,__IPHONE_NA,__IPHONE_NA);
^
In file included from sasl/saslwrapper.cpp:254:
sasl/saslwrapper.h:179:18: warning: 'sasl_client_init' is deprecated: first deprecated in macOS 10.11 [-Wdeprecated-declarations]
result = sasl_client_init(0);
....