婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > python pyhs2 的安裝操作

python pyhs2 的安裝操作

熱門標簽:江蘇客服外呼系統廠家 平頂山外呼系統免費 原裝電話機器人 千陽自動外呼系統 清遠360地圖標注方法 工廠智能電話機器人 在哪里辦理400電話號碼 400電話申請服務商選什么 西藏智能外呼系統五星服務

我就廢話不多說了,大家還是直接看代碼吧~

# 兩個依賴包: saslthrift
The easier way I find to install sasl on windows 7 is to use the pre-compiled version from here : http://www.lfd.uci.edu/~gohlke/pythonlibs/
There is a direct link to the sasl librairies here : http://www.lfd.uci.edu/~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@gmail.com',
  packages=['pyhs2', 'pyhs2/cloudera', 'pyhs2/TCLIService'],
  url='https://github.com/BradRuderman/pyhs2',
  license='LICENSE.txt',
  description='Python Hive Server 2 Client Driver',
  long_description=open('README.md').read(),
  install_requires=[
    "sasl",
    "thrift",
  ],
  test_suite='pyhs2.test',
  tests_require=["mock"]
)

補充:windows7下給python3安裝impyla的艱辛歷程

安裝環境標題已經給出了,linux下和python2下都很容易安裝,我也不知道為什么python3反而這么蛋疼。就直接上干貨吧,希望其他人少走彎路。

安裝所需依賴

pip install ipython six bit_array thriftpy thrift_sasl==0.2.1 sasl impyla(admin下)

常見報錯

error: command ‘C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe' failed with exit status 1158

FileExistsError: [WinError 183] 當文件已存在時,無法創建該文件。

LINK : fatal error LNK1158: cannot run ‘rc.exe'

大致錯誤分析

一般上面的報錯會出現在安裝sasl ,thrift_sasl,和Bitarray時,推測是源碼安裝時pip與windows的兼容性問題,這時可以用二進制文件安裝,參考https://stackoverflow.com/questions/44315943/error-installing-scrapy-error-command-c-program-files-x86-microsoft-visu中第一個回答下的第二條回復

解決辦法

上https://www.lfd.uci.edu/~gohlke/pythonlibs/找到依賴的包的二進制whl文件進行安裝,區分cp36和cp37的,然后一個個安裝,遇到哪個依賴庫報錯就在這個網站中找,用它們的包進行安裝即可

3/20更新

這幾天又發現了新問題:

1. 在重新安裝開發環境時出現了

thriftpy.parser.exc.ThriftParserError: ThriftPy does not support generating module with path in protocol 'c'

2. 在linux上安裝sasl這個庫時,會出現依賴報錯:error: command 'gcc' failed with exit status 1

感覺著實蛋疼,最后才找到了一勞永逸的解決辦法,即使用anaconda安裝impyla即可自動解決依賴問題:

conda install -c anaconda impyla

有時安裝完impyla后還是會報thrift_sasl不存在的錯誤,可以用conda install -c anaconda thrift_sasl==0.2.1即可

參考:https://stackoverflow.com/questions/39220102/error-import-impyla-library-on-windows

以上為個人經驗,希望能給大家一個參考,也希望大家多多支持腳本之家。如有錯誤或未考慮完全的地方,望不吝賜教。

您可能感興趣的文章:
  • python 操作hive pyhs2方式
  • Python3.8.2安裝包及安裝教程圖文詳解(附安裝包)
  • Python 下載及安裝詳細步驟
  • python安裝模塊如何通過setup.py安裝(超簡單)

標簽:安慶 隨州 西安 天水 白城 股票 日照 錦州

巨人網絡通訊聲明:本文標題《python pyhs2 的安裝操作》,本文關鍵詞  python,pyhs2,的,安裝,操作,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《python pyhs2 的安裝操作》相關的同類信息!
  • 本頁收集關于python pyhs2 的安裝操作的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 蓬溪县| 北宁市| 徐水县| 泾源县| 安丘市| 乌兰县| 中江县| 白河县| 烟台市| 罗甸县| 锡林郭勒盟| 广汉市| 胶州市| 中西区| 天气| 南京市| 清水县| 双桥区| 张掖市| 麦盖提县| 赤峰市| 南木林县| 西城区| 盐山县| 长乐市| 敦化市| 黄山市| 莎车县| 陆良县| 东辽县| 海淀区| 铁岭市| 仁寿县| 盐源县| 洪洞县| 聂拉木县| 扬州市| 阿克苏市| 塔城市| 昌吉市| 泗水县|