https://cwiki.apache.org/confluence/display/Hive/HiveClient#HiveClient-Python appears to be outdated.
When I add this to /etc/profile:
export PYTHONP
Below python program should work to access hive tables from python:
import commands cmd = "hive -S -e 'SELECT * FROM db_name.table_name LIMIT 1;' " status, output = commands.getstatusoutput(cmd) if status == 0: print output else: print "error"