I am trying to run my python code within a Ubunu VM (18.04.3) but keep getting the error:
Traceback (most recent call last): File "python-script.py", line 33, in conn = pyodbc.connect('Driver={SQL Server Native Client 11.0};' pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'SQL Server Native Client 11.0' : file not found (0) (SQLDriverConnect)")
I have installed pyodbc with no errors so am confused as to what could be causing this issue. I have done lots of search to a solution but most are for different driver versions and do not resolve this issue. Below is my code for connecting to the DB which I believe could be causing this error:
conn = pyodbc.connect('Driver={SQL Server Native Client 11.0};'
'Server=servername;'
'Database=databasename;'
'Trusted_Connection=yes;')
Any help with this would be much appreciated!
pyodbc
did you install? According to the install documentation (step 3) it's version 17, not 11. – Larnu