Zend certified PHP/Magento developer

Cant open ODBC driver from Python script

I am trying to connect to a database with pyodbc. The script looks like this.

import pyodbc
conn = pyodbc.connect(f"DRIVER=NetezzaSQL;SERVER=xxxxx;PORT=xxxx;DATABASE=XXX;UID=XXX;PWD=XXXXX")

This results in pyodbc.Error: (‘01000′, “[01000] [unixODBC][Driver Manager]Can’t open lib /usr/local/nz/lib/libnzsqlodbc3.so’ : file not found (0) (SQLDriverConnect)”)

So I tried adding that to the $PATH variable.
export PATH=$PATH:/usr/local/nz/lib

I also tried
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/nz/lib

That didnt work so I tried a more basic script not using the pyodbc library
f = open(“/usr/local/nz/lib/libnzsqlodbc3.so”,”r”)
That does see the file and has no problem opening albeit cant read it since it cant decode it.

uname -r
3.10.0-1160.62.1.el7.x86_64

odbcinst -j
unixODBC 2.3.1
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /home/dartweb_dev/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8

cat /etc/odbcinst.ini
[NetezzaSQL]
Driver           = /usr/local/nz/lib/libnzsqlodbc3.so
Setup            = /usr/local/nz/lib/libnzsqlodbc3.so
APILevel         = 1
ConnectFunctions = YYN
Description      = Netezza ODBC driver
DriverODBCVer    = 03.51
DebugLogging     = false
UnicodeTranslationOption = utf8
CharacterTranslationOption = latin9
PreFetch         = 256
Socket           = 16384

Can anyone help point out a next step to figure out why my script cant find my ODBC driver?