Python packages

pyspark
python
#1

Hi

Itversity, Can you please install python package pyhive for accessing hive from python.

1 Like

#2

I am also looking for same info. I was not able to install package pyhive on putty. Kindly help

0 Likes

#3

@vkoralla @Vikrant_Singh_Rana

We have installed pyhive package in our labs. Please check.

1 Like

#4

Thanks Ramesh for the updates.
I am getting below error when trying to make connection to Hive using python. I am executing python script using putty.
(
[vikct001@gw02 python]$ python readHive.py
Traceback (most recent call last):
File “readHive.py”, line 2, in
from pyhive import hive
File “/usr/lib/python2.7/site-packages/pyhive/hive.py”, line 15, in
from TCLIService import TCLIService
File “/usr/lib/python2.7/site-packages/TCLIService/TCLIService.py”, line 9, in
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
ImportError: No module named thrift.Thrift
)

Kindly also let us know whether we are using correct host and port number.
host=“rm01.itversity.com”, port=10000

0 Likes

#5

Can anyone help me here?

0 Likes

#6

I am not able to run my python script using putty. facing below issue.

[vikct001@gw02 python]$ python readHive.py
Traceback (most recent call last):
File “readHive.py”, line 2, in
from pyhive import hive
File “/usr/lib/python2.7/site-packages/pyhive/hive.py”, line 15, in
from TCLIService import TCLIService
File “/usr/lib/python2.7/site-packages/TCLIService/TCLIService.py”, line 9, in
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
ImportError: No module named thrift.Thrift

It seems you need to install below packages as well.
pip install sasl
pip install thrift-sasl
pip install thrift
pip install PyHive

0 Likes

#7

@Vikrant_Singh_Rana

I have already informed you in my previous mail stating-If you want to install any packages please write to support@itversity.com so that our admin check with possibilities & install it in our labs.
As you have asked for other packages we will look into this.
Thank you for your patience.

1 Like

#8

Thanks Ramesh1 for you support. It’s working now

0 Likes

closed #9
0 Likes