Search code examples
pythonpython-3.xpython-2.7hadoopsnakebite

How to import `snakebite` package in Python 3?


I'm trying to connect to Hadoop (HDFS) using Python. I'm using snakebite package for establishing connection. I installed it successfully, but when I'm trying to import it, it gives error as follows:

from snakebite.client import Client
client = Client('localhost', 9000)

Error:

File "C:\pythonNJ\lib\site-packages\snakebite\client.py", line 1473 baseTime = min(time * (1L << retries), cap);

Is there a way to solve it or can someone please tell me how to establish connection by another way?


Solution

  • From its README:

    Snakebite requires python2 (python3 is not supported yet)