[Solved] python Connect hive to Install sasl Error: Building wheel for sasl (setup.py) … error

Collecting sasl
  Using cached sasl-0.3.1.tar.gz (44 kB)
Requirement already satisfied: six in c:\programdata\anaconda3\lib\site-packages (from sasl) (1.16.0)
Building wheels for collected packages: sasl
  Building wheel for sasl (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'D:\\users\\jingtao.CENTALINE\\AppData\\Local\\Temp\\pip-install-2scxm6jd\\sasl_bdd59789a4b54e288cc48a38704a6ad4\\setu
p.py'"'"'; __file__='"'"'D:\\users\\jingtao.CENTALINE\\AppData\\Local\\Temp\\pip-install-2scxm6jd\\sasl_bdd59789a4b54e288cc48a38704a6ad4\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) e
lse io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'D:\users\jingtao.CENTALINE\AppData\Local\Te
mp\pip-wheel-ea8xc0cu'
       cwd: D:\users\jingtao.CENTALINE\AppData\Local\Temp\pip-install-2scxm6jd\sasl_bdd59789a4b54e288cc48a38704a6ad4\
  Complete output (28 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\sasl
  copying sasl\__init__.py -> build\lib.win-amd64-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'
  adding license file 'LICENSE.txt'
  writing manifest file 'sasl.egg-info\SOURCES.txt'
  copying sasl\saslwrapper.cpp -> build\lib.win-amd64-3.9\sasl
  copying sasl\saslwrapper.h -> build\lib.win-amd64-3.9\sasl
  copying sasl\saslwrapper.pyx -> build\lib.win-amd64-3.9\sasl
  running build_ext
  building 'sasl.saslwrapper' extension
  creating build\temp.win-amd64-3.9
  creating build\temp.win-amd64-3.9\Release
  creating build\temp.win-amd64-3.9\Release\sasl
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isasl -IC:\ProgramData\Anaconda3\include -IC:\ProgramData\Anaconda3\include -IC:\Prog
ram Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\
include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Pr
ogram Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /EHsc /Tpsasl/saslwrapper.cpp /Fobuild\temp.win-amd64-3.9\Release\sasl/saslwrapper.obj
  saslwrapper.cpp
  D:\users\jingtao.CENTALINE\AppData\Local\Temp\pip-install-2scxm6jd\sasl_bdd59789a4b54e288cc48a38704a6ad4\sasl\saslwrapper.h(22): fatal error C1083: 无法打开包括文件: “sasl/sasl.h”: No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  ----------------------------------------
  ERROR: Failed building wheel for sasl
  Running setup.py clean for sasl
Failed to build sasl
Installing collected packages: sasl
    Running setup.py install for sasl ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'D:\\users\\jingtao.CENTALINE\\AppData\\Local\\Temp\\pip-install-2scxm6jd\\sasl_bdd59789a4b54e288cc48a38704a6ad4\\se
tup.py'"'"'; __file__='"'"'D:\\users\\jingtao.CENTALINE\\AppData\\Local\\Temp\\pip-install-2scxm6jd\\sasl_bdd59789a4b54e288cc48a38704a6ad4\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__)
 else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'D:\users\jingtao.CENTALINE\AppData\Loca
l\Temp\pip-record-l_ubu2on\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\sasl'
         cwd: D:\users\jingtao.CENTALINE\AppData\Local\Temp\pip-install-2scxm6jd\sasl_bdd59789a4b54e288cc48a38704a6ad4\
    Complete output (28 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    creating build\lib.win-amd64-3.9\sasl
    copying sasl\__init__.py -> build\lib.win-amd64-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'
    adding license file 'LICENSE.txt'
    writing manifest file 'sasl.egg-info\SOURCES.txt'
    copying sasl\saslwrapper.cpp -> build\lib.win-amd64-3.9\sasl
    copying sasl\saslwrapper.h -> build\lib.win-amd64-3.9\sasl
    copying sasl\saslwrapper.pyx -> build\lib.win-amd64-3.9\sasl
    running build_ext
    building 'sasl.saslwrapper' extension
    creating build\temp.win-amd64-3.9
    creating build\temp.win-amd64-3.9\Release
    creating build\temp.win-amd64-3.9\Release\sasl
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isasl -IC:\ProgramData\Anaconda3\include -IC:\ProgramData\Anaconda3\include -IC:\Pr
ogram Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\1
0\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\
Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /EHsc /Tpsasl/saslwrapper.cpp /Fobuild\temp.win-amd64-3.9\Release\sasl/saslwrapper.obj
    saslwrapper.cpp
    D:\users\jingtao.CENTALINE\AppData\Local\Temp\pip-install-2scxm6jd\sasl_bdd59789a4b54e288cc48a38704a6ad4\sasl\saslwrapper.h(22): fatal error C1083: 无法打开包括文件: “sasl/sasl.h”: No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'D:\\users\\jingtao.CENTALINE\\AppData\\Local\\Temp\\pip-install-2scxm6jd\\sasl_bdd
59789a4b54e288cc48a38704a6ad4\\setup.py'"'"'; __file__='"'"'D:\\users\\jingtao.CENTALINE\\AppData\\Local\\Temp\\pip-install-2scxm6jd\\sasl_bdd59789a4b54e288cc48a38704a6ad4\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__fi
le__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'D:\use
rs\jingtao.CENTALINE\AppData\Local\Temp\pip-record-l_ubu2on\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\sasl' Check the logs for full command output.

 

Solution:
Download a sasl file that corresponds to the Python version and Windows version you are using: https://www.lfd.uci.edu/~gohlke/pythonlibs/#sasl. For example, sasl-0.2.1-cp36 -cp36m-win_amd64.whl, which corresponds to Python version 3.6, and corresponds to Windows system 64-bit.
Install the executable pip install sasl-0.2.1-cp37-cp37m-win_amd64.whl

Read More: