image not found & No module named 'kerberos_sspi'
brentonmallen1 opened this issue · comments
CarpeFridiem commented
When I try to import prestodb I get the following error
Traceback (most recent call last):
File "/Users/.../lib/python3.6/site-packages/requests_kerberos/kerberos_.py", line 2, in <module>
import kerberos
ImportError: dlopen(/Users/.../lib/python3.6/site-packages/kerberos.cpython-36m-darwin.so, 2): Library not loaded: libgssapi_krb5.2.2.dylib
Referenced from: /Users/.../lib/python3.6/site-packages/kerberos.cpython-36m-darwin.so
Reason: image not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/.../lib/python3.6/site-packages/prestodb/__init__.py", line 16, in <module>
from . import dbapi
File "/Users/.../lib/python3.6/site-packages/prestodb/dbapi.py", line 31, in <module>
import prestodb.client
File "/Users/.../lib/python3.6/site-packages/prestodb/client.py", line 40, in <module>
from requests_kerberos.exceptions import KerberosExchangeError
File "/Users/.../lib/python3.6/site-packages/requests_kerberos/__init__.py", line 17, in <module>
from .kerberos_ import HTTPKerberosAuth, REQUIRED, OPTIONAL, DISABLED
File "/Users/.../lib/python3.6/site-packages/requests_kerberos/kerberos_.py", line 5, in <module>
import kerberos_sspi as kerberos
ModuleNotFoundError: No module named 'kerberos_sspi'```
I have the same environment that some peers have and I'm the only one encountering the issue. Any suggestions as to what may be causing this? I'm on OS X 10.13.3 and can provide the conda environment I'm using if need be.
CarpeFridiem commented
For those who might come across this in the future, I was able to fix the issue.
Turns out that pykerberos
was having some issues and they recommend using kerberos
( https://github.com/02strich/pykerberos). I was also missing another dependency, krb5
.
I'm using a conda environment so I installed them by doing the following:
conda install krb5
pip install kerberos