[unixODBC][Driver Manager]Can't open lib 'ODBC Driver 1X for SQL Serv
Database 2024/3/12 21:33:07 点击:不统计
http://%77w%77%2E%66%6F%72%61%73%70%2E%63n网站制作学习
在linux 系统上使用 python 连接 sql server
import pyodbc
# 连接数据库
conn = pyodbc.connect(
'DRIVER={ODBC Driver 17 for SQL Server};'
'SERVER=192.168.5.114;'
'DATABASE=nanjingyiwu;'
'UID=luhuijie;'
'PWD=luhuijie;'
)
出现Error connecting to the database: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 13 for SQL Server'
是因为本地没有安装 驱动。
参考 https://www.forasp.cn/html/3147.html
参考 https://www.forasp.cn/html/3147.html
http://%77%77%77%2E%66%6F%72%61%73%70%2E%63%6E