亚洲精品久久久中文字幕-亚洲精品久久片久久-亚洲精品久久青草-亚洲精品久久婷婷爱久久婷婷-亚洲精品久久午夜香蕉

您的位置:首頁技術(shù)文章
文章詳情頁

python pyhs2 的安裝操作

瀏覽:25日期:2022-06-23 10:23:34

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

# 兩個依賴包: sasl&thriftThe 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 setupsetup( 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的艱辛歷程

安裝環(huán)境標題已經(jīng)給出了,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.0VCBINx86_amd64link.exe’ failed with exit status 1158

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

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

大致錯誤分析

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

解決辦法

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

3/20更新

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

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

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

2. 在linux上安裝sasl這個庫時,會出現(xiàn)依賴報錯: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

以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持好吧啦網(wǎng)。如有錯誤或未考慮完全的地方,望不吝賜教。

標簽: Python 編程
相關(guān)文章:
主站蜘蛛池模板: 乱人xxx国语对白91 | 欧美激情首页 | xxx中国xx| 谁有免费的黄色网址 | 久久久久亚洲 | 久久免费99精品久久久久久 | 做受又硬又粗又免费视频 | aaaaaa精品视频在线观看 | 免费久久一级欧美特大黄 | 欧美亚洲黄色片 | 欧美人超级乱淫片免费 | 亚洲三级网 | 99九九精品免费视频观看 | 青草色视频 | 免费高清欧美大片在线观看 | 在线播放免费人成毛片乱码 | 欧美换爱交换乱理伦片不卡片 | 中文字幕日韩高清 | 日本乱人伦毛片 | 中文永久免费观看网站 | 国产大尺度福利视频在线 | 免费看午夜高清性色生活片 | 热er99久久6国产精品免费 | a级免费观看 | 麻豆果冻国产91在线极品 | 精品视频久久久 | 欧美高清在线不卡免费观看 | 成人一级黄色片 | 成人宗合网| 黄频在线免费观看 | 出a级黑粗大硬长爽猛视频 加勒比一道本综合 | 三上悠亚magnet| 欧美久操 | 91视频第一页 | 免费高清精品国偷自产在线 | 亚洲成人播放 | 一级毛片在线免费播放 | 亚洲午夜精品 | 国产在线精品成人一区二区三区 | hh99m 福利毛片 | 久热香蕉精品视频在线播放 |