Python Forum

Full Version: jaydebeapi architecture error?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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:


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.close
I 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.
There seem to be instructions on how to make that visible for windows install (aslo Linux and OS-X) here http://jpy.readthedocs.io/en/latest/install.html
Search 'Typical Build Problems' on the page (ctrl-f)
Thanks Larz60+, that did point me in the right direction. I ended up pointing all my java variables to a 1.7 jdk that was on my machine and it all started working!