Running setup.py install for sasl … error

error in pyhive server installation.

  Building wheel for sasl (setup.py) ... 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/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qksr141u/sasl/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 /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/__init__.py -> 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 'MANIFEST.in'
  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 https://pypi.tuna.tsinghua.edu.cn/simple

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

first

can be installed in win, but it lacks

File "D:\python\lib\site-packages\pyhive\hive.py", 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\hive.py", line 192, in __init__
    self._transport.open()
  File "D:\python\lib\site-packages\thrift_sasl\__init__.py", 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

directly

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

感谢所有给我实际有效帮助的大佬!!

为视频推荐在深度学习QQ群277356808

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

我在这里等你


Read More: