Hi!
I’m encountering an issue while deploying an APP including access to Hive db.
I’ve followed the documentation and have attempted various combinations of packages.txt and requirements.txt but still kept getting the error message I pasted blow.
My python version: 3.10
My secrets file contains:
[connections.hive]
dialect = “hive”
host = “xxx”
port = xxx
database = “xxx”
username = “xxx”
password = “xxx”
My code:
conn = st.connection('hive', type='sql')
df = conn.query('SELECT * FROM [my_table_name] LIMIT 50;', ttl=600)
st.write(df)
My requirements.txt:
scipy
scikit-learn
plotly
XlsxWriter
thrift
sasl
sasl3
pyhive[hive]==0.7.0
SQLAlchemy==1.4.7
wheel==0.36.2
My packages.txt:
cyrus-sasl
cyrus-sasl-dev
libsasl2-dev
libsasl2-modules-gssapi-mit
libgsasl
libgsasl-devel
saslwrapper
Any clue would be highly appreciated! Thank you!
Building wheels for collected packages: pyhive, SQLAlchemy, thrift, sasl, sasl3, pure-sasl
Building wheel for pyhive (setup.py): started
Building wheel for pyhive (setup.py): finished with status 'done'
Created wheel for pyhive: filename=PyHive-0.7.0-py3-none-any.whl size=53879 sha256=14813e962b1e85d977ddf1c2310666f3217254ac0871b859619ead9d454761e9
Stored in directory: /tmp/pip-ephem-wheel-cache-f1yuxaci/wheels/d3/fc/31/6974270c69ccc5bf8f848e2e41b527d0e8f5b9b973696a29a9
Building wheel for SQLAlchemy (setup.py): started
Building wheel for SQLAlchemy (setup.py): finished with status 'done'
Created wheel for SQLAlchemy: filename=SQLAlchemy-1.4.7-cp310-cp310-linux_x86_64.whl size=1508154 sha256=150b1061ee86775f984a8bfd554733a0b78c6dc1427d79fe90598dd8a57f3748
Stored in directory: /tmp/pip-ephem-wheel-cache-f1yuxaci/wheels/2f/ac/26/354201858537710b7280adfe644d7b3b47556bc4fcef38d2e3
Building wheel for thrift (setup.py): started
Building wheel for thrift (setup.py): finished with status 'done'
Created wheel for thrift: filename=thrift-0.21.0-cp310-cp310-linux_x86_64.whl size=466045 sha256=cb314ad081551e141334469be714d8dee229f313235f1a8b1ee2f5d1badbe38a
Stored in directory: /tmp/pip-ephem-wheel-cache-f1yuxaci/wheels/a6/7f/00/794a649d98a25c862caa95ee7cc28a8b60666cbfaf8dd06a50
Building wheel for sasl (setup.py): started
Building wheel for sasl (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
running bdist_wheel
running build
running build_py
creating build/lib.linux-x86_64-cpython-310/sasl
copying sasl/__init__.py -> build/lib.linux-x86_64-cpython-310/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'
adding license file 'LICENSE.txt'
writing manifest file 'sasl.egg-info/SOURCES.txt'
copying sasl/saslwrapper.cpp -> build/lib.linux-x86_64-cpython-310/sasl
copying sasl/saslwrapper.h -> build/lib.linux-x86_64-cpython-310/sasl
copying sasl/saslwrapper.pyx -> build/lib.linux-x86_64-cpython-310/sasl
running build_ext
building 'sasl.saslwrapper' extension
creating build/temp.linux-x86_64-cpython-310/sasl
g++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Isasl -I/home/adminuser/venv/include -I/usr/local/include/python3.10 -c sasl/saslwrapper.cpp -o build/temp.linux-x86_64-cpython-310/sasl/saslwrapper.o
In file included from sasl/saslwrapper.cpp:629:
sasl/saslwrapper.h:22:10: fatal error: sasl/sasl.h: No such file or directory
22 | #include <sasl/sasl.h>
| ^~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/g++' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for sasl
Running setup.py clean for sasl
Building wheel for sasl3 (setup.py): started
Building wheel for sasl3 (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [42 lines of output]
/home/adminuser/venv/lib/python3.10/site-packages/setuptools/dist.py:488: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!
********************************************************************************
Usage of dash-separated 'description-file' will not be supported in future
versions. Please use the underscore name 'description_file' instead.
By 2025-Mar-03, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
opt = self.warn_dash_deprecation(opt, section)
running bdist_wheel
running build
running build_py
creating build/lib.linux-x86_64-cpython-310/sasl
copying sasl/__init__.py -> build/lib.linux-x86_64-cpython-310/sasl
running egg_info
writing sasl3.egg-info/PKG-INFO
writing dependency_links to sasl3.egg-info/dependency_links.txt
writing requirements to sasl3.egg-info/requires.txt
writing top-level names to sasl3.egg-info/top_level.txt
reading manifest file 'sasl3.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE.txt'
writing manifest file 'sasl3.egg-info/SOURCES.txt'
copying sasl/saslwrapper.cpp -> build/lib.linux-x86_64-cpython-310/sasl
copying sasl/saslwrapper.h -> build/lib.linux-x86_64-cpython-310/sasl
copying sasl/saslwrapper.pyx -> build/lib.linux-x86_64-cpython-310/sasl
running build_ext
building 'sasl.saslwrapper' extension
creating build/temp.linux-x86_64-cpython-310/sasl
g++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Isasl -I/home/adminuser/venv/include -I/usr/local/include/python3.10 -c sasl/saslwrapper.cpp -o build/temp.linux-x86_64-cpython-310/sasl/saslwrapper.o
In file included from sasl/saslwrapper.cpp:617:
sasl/saslwrapper.h:22:10: fatal error: sasl/sasl.h: No such file or directory
22 | #include <sasl/sasl.h>
| ^~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/g++' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for sasl3
Running setup.py clean for sasl3
Building wheel for pure-sasl (setup.py): started
Building wheel for pure-sasl (setup.py): finished with status 'done'
Created wheel for pure-sasl: filename=pure_sasl-0.6.2-py3-none-any.whl size=11422 sha256=ad32e81f858b7a1cdcadc579a53a8644d23354d49a82c5119d2886477ebe053f
Stored in directory: /tmp/pip-ephem-wheel-cache-f1yuxaci/wheels/57/7c/93/062238b0a68efe214024ca178233f248971045db1033c96a52
Successfully built pyhive SQLAlchemy thrift pure-sasl
Failed to build sasl sasl3
ERROR: Could not build wheels for sasl, sasl3, which is required to install pyproject.toml-based projects