Why "ImportError: No module named builtins" appears after importing hive from PyHive package?
I have a simple question to ask. I have been trying to execute HIVE queries from Python using impyla package. But I stuck into cursor problem, already a question has been asked on stackoverflow. In this question, a user answered and advised to use PyHive instead.
Therefore, now I am trying to execute HIVE queries from Python using PyHive. But unluckily, I am stuck at another issue which seems to be not that complicated. As soon as I execute the following line in python I get an error:
In : from pyhive import hive Traceback (most recent call last): File "<ipython-input-18-747088b97eb4>", line 1, in <module> from pyhive import hive File "build\bdist.win32\egg\pyhive\hive.py", line 13, in <module> File "build\bdist.win32\egg\pyhive\common.py", line 8, in <module> ImportError: No module named builtins
Can anyone indicate where I am getting it wrong? Since, I have already successfully installed the PyHive package on my machine, so I don't expect this to appear. I have been searching allot to find a reason of this error. It will be really a great time saver if I know the solution today. Thank you very much for your time and support.
I am using:
- Windows 7 (64-bit)
- Python 2.7 (32-bit)
- Anaconda2 4.1.1 (32-bit)
In python 3 the module __builtin__ was renamed to builtins.
It is possible that you have installed a python 3 package and are trying to run it with python 2.