濮阳杆衣贸易有限公司

主頁(yè) > 知識(shí)庫(kù) > python pyhs2 的安裝操作

python pyhs2 的安裝操作

熱門標(biāo)簽:江蘇客服外呼系統(tǒng)廠家 平頂山外呼系統(tǒng)免費(fèi) 原裝電話機(jī)器人 千陽(yáng)自動(dòng)外呼系統(tǒng) 清遠(yuǎn)360地圖標(biāo)注方法 工廠智能電話機(jī)器人 在哪里辦理400電話號(hào)碼 400電話申請(qǐng)服務(wù)商選什么 西藏智能外呼系統(tǒng)五星服務(wù)

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

# 兩個(gè)依賴包: 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"]
)

補(bǔ)充:windows7下給python3安裝impyla的艱辛歷程

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

安裝所需依賴

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

常見報(bào)錯(cuò)

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] 當(dāng)文件已存在時(shí),無(wú)法創(chuàng)建該文件。

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

大致錯(cuò)誤分析

一般上面的報(bào)錯(cuò)會(huì)出現(xiàn)在安裝sasl ,thrift_sasl,和Bitarray時(shí),推測(cè)是源碼安裝時(shí)pip與windows的兼容性問題,這時(shí)可以用二進(jìn)制文件安裝,參考https://stackoverflow.com/questions/44315943/error-installing-scrapy-error-command-c-program-files-x86-microsoft-visu中第一個(gè)回答下的第二條回復(fù)

解決辦法

上https://www.lfd.uci.edu/~gohlke/pythonlibs/找到依賴的包的二進(jìn)制whl文件進(jìn)行安裝,區(qū)分cp36和cp37的,然后一個(gè)個(gè)安裝,遇到哪個(gè)依賴庫(kù)報(bào)錯(cuò)就在這個(gè)網(wǎng)站中找,用它們的包進(jìn)行安裝即可

3/20更新

這幾天又發(fā)現(xiàn)了新問題:

1. 在重新安裝開發(fā)環(huán)境時(shí)出現(xiàn)了

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

2. 在linux上安裝sasl這個(gè)庫(kù)時(shí),會(huì)出現(xiàn)依賴報(bào)錯(cuò):error: command 'gcc' failed with exit status 1

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

conda install -c anaconda impyla

有時(shí)安裝完impyla后還是會(huì)報(bào)thrift_sasl不存在的錯(cuò)誤,可以用conda install -c anaconda thrift_sasl==0.2.1即可

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

以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教。

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

標(biāo)簽:安慶 隨州 西安 天水 白城 股票 日照 錦州

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《python pyhs2 的安裝操作》,本文關(guān)鍵詞  python,pyhs2,的,安裝,操作,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《python pyhs2 的安裝操作》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于python pyhs2 的安裝操作的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    清河县| 中阳县| 吉木乃县| 晋江市| 福建省| 通辽市| 永年县| 阜康市| 安康市| 甘洛县| 灌南县| 江川县| 文成县| 西藏| 兴化市| 南木林县| 泰州市| 临颍县| 仁怀市| 阜南县| 遂溪县| 富民县| 礼泉县| 容城县| 奇台县| 嘉峪关市| 墨玉县| 错那县| 宁强县| 千阳县| 易门县| 哈巴河县| 九龙坡区| 渑池县| 托里县| 乌什县| 慈溪市| 米泉市| 峡江县| 台南市| 松溪县|