Running install for sasl … error

error in pyhive server installation.

  Building wheel for sasl ( ... error
  ERROR: Command errored out with exit status 1:
   command: /home/。/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qksr141u/sasl/'"'"'; __file__='"'"'/tmp/pip-install-qksr141u/sasl/'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);'"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-8vc27rta --python-tag cp37
       cwd: /tmp/pip-install-qksr141u/sasl/
  Complete output (28 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/sasl
  copying sasl/ -> build/lib.linux-x86_64-3.7/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 ''
  writing manifest file 'sasl.egg-info/SOURCES.txt'
  copying sasl/saslwrapper.cpp -> build/lib.linux-x86_64-3.7/sasl
  copying sasl/saslwrapper.h -> build/lib.linux-x86_64-3.7/sasl
  copying sasl/saslwrapper.pyx -> build/lib.linux-x86_64-3.7/sasl
  running build_ext
  building 'sasl.saslwrapper' extension
  creating build/temp.linux-x86_64-3.7
  creating build/temp.linux-x86_64-3.7/sasl
  gcc -pthread -B /home/。/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Isasl -I/home/。/anaconda3/include/python3.7m -c sasl/saslwrapper.cpp -o build/temp.linux-x86_64-3.7/sasl/saslwrapper.o
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  In file included from sasl/saslwrapper.cpp:254:0:
  sasl/saslwrapper.h:22:23: fatal error: sasl/sasl.h: No such file or directory
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  ERROR: Failed building wheel for sasl

I thought it was a network access problem, tried qinghua source still not ah.

pip install sasl -i

searched the data, and I need to use apt-get to install the corresponding things, but I have no permission, please help operation and maintenance.

sudo apt-get install libsasl2-dev

to save time, I tried installing WHL directly and found that it was only available in the win version. Woc, try


can be installed in win, but it lacks

File "D:\python\lib\site-packages\pyhive\", line 153, in __init__
    import thrift_sasl
ModuleNotFoundError: No module named 'thrift_sasl'

after installing this library you actually installed several libraries

Successfully installed pure-sasl-0.6.2 six-1.15.0 thrift-sasl-0.4.2

, but it’s still wrong in win, maybe it’s the permission problem

File "D:\python\lib\site-packages\pyhive\", line 192, in __init__
  File "D:\python\lib\site-packages\thrift_sasl\", line 85, in open
    message=("Could not start SASL: %s" % self.sasl.getError()))
thrift.transport.TTransport.TTransportException: Could not start SASL: b'Error in sasl_client_start (-4) SASL(-4): no mechanism available: Unable to find a callback: 2'

my server tries to install these


only the first one was installed successfully, but it still lacks sasl, and when I unloaded thrift and reinstalled the last one, it still doesn’t work

wait till tomorrow. Bye bye

added: 20200604, colleagues to the boss

apt-get install python-dev libsasl2-dev gcc

then proceed to install and fix the problem.

pip install sasl
pip install thrift_sasl



For Speech, Image, Video in deep learning QQ群868373192


Read More: