In order to connect to Hive data warehouse from python. Using pyhive requires sasl - ModuleNotFoundError: No module named 'sasl'
Installing sasl fails with errors below
Python 3.9.4 installed gcc, libsasl2
MACOS Mojave v 10.14
pip3 install 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/[email protected]/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/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/[email protected]/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);
....
It doesn't support Python3.9 yet Python 3.7 works Thank you for your attention folks :)