pyodbc icon indicating copy to clipboard operation
pyodbc copied to clipboard

proper way to detect unixODBC

Open dcsaba89 opened this issue 3 years ago • 1 comments
trafficstars

Please first make sure you have looked at:

  • Documentation: https://github.com/mkleehammer/pyodbc/wiki
  • Other issues

Environment

To diagnose, we usually need to know the following, including version numbers. On Windows, be sure to specify 32-bit Python or 64-bit:

  • Python:
  • pyodbc:
  • OS:
  • DB:
  • driver:

Issue

https://github.com/mkleehammer/pyodbc/blob/master/setup.py#L240

in setup.py line 240 after the comment What is the proper way to detect iODBC, MyODBC, unixODBC, etc.? it should be settings['libraries'].append(':libodbc.so.2')

dcsaba89 avatar Aug 26 '22 11:08 dcsaba89

The standard way is to run odbcinst -j although if you have several unixODBC installations it may be inaccurate. In that case the ultimate way is to do an strace and see which lib is actually loaded.

v-makouz avatar Aug 31 '22 16:08 v-makouz