Ask Your Question
0

Jython: Unable to install / use pyodbc package

asked 2020-05-11 03:05:58 -0500

Ronald M gravatar image

Used https://ask.streamsets.com/question/4... as a guide to installing external Python packages into Streamsets Data Collector. I was able to successfully pip install pyodbc.

However, when I imported pyodbc inside a Jython evaluator, it fails.

image description

I can confirm that pyodbc objects (.egg-info and .so files) are in /usr/lib64/python2.7/site-packages.

I noticed that the requests package works fine - but is located in /usr/lib/python2.7/site-packages.

Is there any reason why pyodbc doesn't get seen by the Jython evaluator? Is there any relationship with where the package gets installed?

Additional Information: Running on a Docker Container StreamSets Data Collector 3.14.0 Running with CentOS 7

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-05-12 00:18:30 -0500

iamontheinet gravatar image

Hi Ronald,

This is most likely because pyodbc contains/depends on C++ extensions which cannot be loaded by Jython. Which ODBC database are you attempting to connect to? Or, what exactly are you trying to do? Maybe there's another way.

Cheers, Dash

edit flag offensive delete link more

Comments

For this particular test, it was just MySQL ODBC. However, the real scenario is getting data from a Infor LN (10.4 or 10.6) data source. Had also looked into a ODBC JDBC bridge, but I'm not sure if this will work as well. Thanks

Ronald M gravatar imageRonald M ( 2020-05-12 02:19:29 -0500 )edit

According to this doc -- http://www.baansupport.com/docs/erpln/U9173G%20US.pdf -- there seems to be JDBC integration. You might want to check that out.

iamontheinet gravatar imageiamontheinet ( 2020-05-12 09:11:31 -0500 )edit

Thanks. Yeah, we saw this before, but unfortunately, this is not available for some reason.

Ronald M gravatar imageRonald M ( 2020-05-14 00:29:27 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-05-11 03:05:58 -0500

Seen: 27 times

Last updated: May 12