Feb-10-2017, 04:41 AM
Hello All,
I am struggling with connecting to a database using a jdbc driver. In the interest of full disclosure I am a bit of n00b with python.
I am on a Mac (El Capitan) and I have used Homebrew to install Python 3.6.
Here is my code:
Any ideas where I am going astray?
Thanks.
I am struggling with connecting to a database using a jdbc driver. In the interest of full disclosure I am a bit of n00b with python.
I am on a Mac (El Capitan) and I have used Homebrew to install Python 3.6.
Here is my code:
import jaydebeapi conn = jaydebeapi.connect('org.netezza.Driver',['jdbc:netezza://servername:5480/catalogName','user','password']) curs = conn.cursor() curs.execute("select system_software_version from _v_system_info") data = curs.fetchone() print("Netezza Version = %s" % data) conn.closeI then get the following error:
Quote:File "/usr/local/lib/python3.6/site-packages/jpype/_core.py", line 50, in startJVM
_jpype.startup(jvm, tuple(args), True)
builtins.RuntimeError: Unable to load DLL [/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libjvm.dylib], error = dlopen(/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libjvm.dylib, 9): no suitable image found. Did find:
/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libjvm.dylib: mach-o, but wrong architecture at native/common/include/jp_platform_linux.h:45
Any ideas where I am going astray?
Thanks.