title: pyhive, sqlalchemy can not connect to hadoop sandbox
body: <p>I have installed,</p>
  
  <pre><code>pip install thrift
  pip install PyHive
  pip install thrift-sasl
  </code></pre>
  
  <p>and 
  since <code>pip install sasl</code> failed I downloaded <a href="http://www.lfd.uci.edu/%7Egohlke/pythonlibs/#sasl" rel="nofollow noreferrer">sasl‑0.2.1‑cp27‑cp27m‑win_amd64.whl</a> file and installed it in my Windows 8.1 PC.</p>
  
  <p>Then I wrote this code,</p>
  
  <pre><code>from pyhive import hive
  cursor = hive.connect('192.168.1.232', port=10000, auth='NONE')
  cursor.execute('SELECT * from sample_07 LIMIT 5',async=True)
  print cursor.fetchall()
  </code></pre>
  
  <p>this gives the error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/DigInEngine/scripts/UserManagementService/fd.py", line 37, in &lt;module&gt;
      cursor = hive.connect('192.168.1.232', port=10000, auth = 'NONE')
    File "C:\Python27\lib\site-packages\pyhive\hive.py", line 63, in connect
      return Connection(*args, **kwargs)
    File "C:\Python27\lib\site-packages\pyhive\hive.py", line 104, in __init__
      self._transport.open()
    File "C:\Python27\lib\site-packages\thrift_sasl\__init__.py", line 72, in open
      message=("Could not start SASL: %s" % self.sasl.getError()))
  thrift.transport.TTransport.TTransportException: Could not start SASL: Error in sasl_client_start (-4) SASL(-4): no mechanism available: Unable to find a callback: 2
  </code></pre>
  
  <p>and this code gives,</p>
  
  <pre><code>from sqlalchemy import create_engine
  engine = create_engine('hive://192.168.1.232:10000/default')
  try:
      connection = engine.connect()
  except Exception, err:
      print err
  result = connection.execute('select * from sample_07;')
  engine.dispose()
  </code></pre>
  
  <p>this error,</p>
  
  <blockquote>
    <p>Could not start SASL: Error in sasl_client_start (-4) SASL(-4): no
    mechanism available: Unable to find a callback: 2</p>
  </blockquote>
  
  <p>I have downloaded Hortonworks sandbox from <a href="http://hortonworks.com/downloads/#sandbox" rel="nofollow noreferrer">here</a> and use it in a separate server.</p>
  
  <p><strong>NOTE:</strong> I went through <a href="https://stackoverflow.com/questions/17722372/access-hive-data-using-python">this</a> as well but the accepted answer is not working for me, because importing ThriftHive from hive gives Import error although I have pip installed hive. So I decided to use pyhive or sqlalchemy</p>
  
  <p>How can I connect to hive and execute a query easily?</p>