生活随笔
收集整理的這篇文章主要介紹了
python下载pyhive包:
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
**
windows安裝pyhive:
**
pip install sasl
pip install thrift
pip install thrift-sasl
pip install sasl
- 輸入pip install sasl 時我就掉入了坑里
Running setup.py clean for sasl
Failed to build sasl
Installing collected packages: saslRunning setup.py install for sasl ... errorERROR: Command errored out with exit status 1:command: 'D:\Anaconda\new\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\TEMP\\pip-req-build-ylznhdre\\setup.py'"'"'; __file__='"'"'C:\\TEMP\\p
ip-req-build-ylznhdre\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file_
_, '"'"'exec'"'"'))' install --record 'C:\TEMP\pip-record-0h5yrvtx\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\Anaconda\new\Include\s
asl'cwd: C:\TEMP\pip-req-build-ylznhdre\Complete output (21 lines):running installrunning buildrunning build_pycreating buildcreating build\lib.win-amd64-3.7creating build\lib.win-amd64-3.7\saslcopying sasl\__init__.py -> build\lib.win-amd64-3.7\saslrunning egg_infowriting sasl.egg-info\PKG-INFOwriting dependency_links to sasl.egg-info\dependency_links.txtwriting requirements to sasl.egg-info\requires.txtwriting top-level names to sasl.egg-info\top_level.txtreading 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.win-amd64-3.7\saslcopying sasl\saslwrapper.h -> build\lib.win-amd64-3.7\saslcopying sasl\saslwrapper.pyx -> build\lib.win-amd64-3.7\saslrunning build_extbuilding 'sasl.saslwrapper' extensionerror: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
在報錯信息中,我們可以得知缺少sasl的依賴包gcc。
解決方法就是去官網(wǎng)下載.
注意!!!python的版本需要對應依賴包的版本:比如我的python版本是3.7.3,我需要下載的依賴包版本為cp37。
依賴包下載官網(wǎng)
下載到指定目錄下(自己看著放),然后在cmd中切換到該目錄,執(zhí)行:pip install sasl-0.2.1-cp37-cp37m-win_amd64.whl
總結(jié)
以上是生活随笔為你收集整理的python下载pyhive包:的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。