I'll cut to the chase, so let's get right to the code~
# Two dependencies: sasl&thrift The easier way I find to install sasl on windows 7 is to use the pre-compiled version from here : /~gohlke/pythonlibs/ There is a direct link to the sasl librairies here : /~gohlke/pythonlibs/#sasl just pick the one you need. Then you install it using pip : pip install sasl-0.1.3-cp27-none-win_amd64.whl from setuptools import setup setup( name='pyhs2', version='0.6.0', author='Brad Ruderman', author_email='bradruderman@', packages=['pyhs2', 'pyhs2/cloudera', 'pyhs2/TCLIService'], url='/BradRuderman/pyhs2', license='', description='Python Hive Server 2 Client Driver', long_description=open('').read(), install_requires=[ "sasl", "thrift", ], test_suite='', tests_require=["mock"] )
Addendum: the arduous process of installing impyla for python3 on windows 7
The title of the installation environment is already given, it's easy to install under linux and under python2, I don't know why python3 is such a pain in the ass instead. Let's just go straight to the dry stuff, and hopefully others will take the easy way out.
Installation of required dependencies
pip install ipython six bit_array thriftpy thrift_sasl==0.2.1 sasl impyla(adminarrive at (a decision, conclusion etc))
Common Errors
error: command ‘C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\' failed with exit status 1158
FileExistsError: [WinError 183] Cannot create file when it already exists.
LINK : fatal error LNK1158: cannot run ‘'
Rough error analysis
Generally the above error will appear in the installation of sasl, thrift_sasl, and Bitarray, presumably the source code installation pip and windows compatibility issues, this time you can use the binary file to install, refer to the/questions/44315943/error-installing-scrapy-error-command-c-program-files-x86-microsoft-visuSecond reply under the first answer in
method settle an issue
first (of multiple parts)/~gohlke/pythonlibs/Find the binary whl files of the dependent packages to install, differentiate between cp36 and cp37, and then install them one by one, and find which dependent libraries report errors in this website, and use their packages to install them.
Updated 3/20
New problems have been discovered in the last few days:
1. Appeared when reinstalling the development environment
: ThriftPy does not support generating module with path in protocol 'c'
2. When installing the sasl library on linux, a dependency error occurs: error: command 'gcc' failed with exit status 1
It was a real pain in the ass, so I finally found a permanent solution, which is to use anaconda to install impyla to solve the dependency problem automatically:
conda install -c anaconda impyla
Sometimes after installing impyla it will still report that thrift_sasl doesn't exist, you can use conda install -c anaconda thrift_sasl==0.2.1 to do that!
Reference:/questions/39220102/error-import-impyla-library-on-windows
The above is a personal experience, I hope it can give you a reference, and I hope you can support me more. If there is any mistake or something that has not been fully considered, please do not hesitate to give me advice.