0

I am trying to connect Hive in Hortonworks using JayDeBeApi inside the Python script. I've installed Python 64 bit and setup with PyCharm IDE. I've installed JayDeBeApi as well. I am getting the following error and not sure what I am missing.

    C:\Python27\python.exe C:/Projects_Work/primex/tableau/TDEConnect.py
    Opening connection.....
    Traceback (most recent call last):
    File "C:/Projects_Work/primex/tableau/TDEConnect.py", line 47, in <module>
main()
    File "C:/Projects_Work/primex/tableau/TDEConnect.py", line 19, in main
with connect() as conn:
    File "C:/Projects_Work/primex/tableau/TDEConnect.py", line 30, in __enter__
{'user': sslUser, 'password': sslPassword}, driverPath, )
    File "C:\Python27\lib\site-packages\jaydebeapi\__init__.py", line 381, in connect
    jconn = _jdbc_connect(jclassname, url, driver_args, jars, libs)
    File "C:\Python27\lib\site-packages\jaydebeapi\__init__.py", line 159, in _jdbc_connect_jpype
    import jpype
    File "C:\Python27\lib\site-packages\jpype\__init__.py", line 17, in <module>
from ._jpackage import *
    File "C:\Python27\lib\site-packages\jpype\_jpackage.py", line 18, in <module>
    import _jpype

    ImportError: DLL load failed: %1 is not a valid Win32 application.

    Process finished with exit code 1

Any input would be great. Thanks.

Suri
  • 229
  • 2
  • 15

2 Answers2

0

JayDebeApi contain JPype for run Java Class from Python. Is necesary to have installed C++ Compiler for Python before installing JayDebeApi

Windows

0

Alternatively, you can get the Jpype wheel directly (if for auth reasons you can't get C++ dev suit installed)

jpype wheel files

c.Parsi
  • 771
  • 2
  • 9
  • 26