Access MS SQL server on a mac via pyodbc with openssl3.0 installed
Matt Dufty
0
Reputation points
I have installed unixodbc, pyodbc and openssl3.0 on my back
import pyodbc
SERVER = 'SERVER'
DATABASE = 'DB'
USERNAME = 'USER'
PASSWORD = "xxxxxxxxx"
DRIVER = '/opt/homebrew/Cellar/msodbcsql18/18.4.1.1/lib/libmsodbcsql.18.dylib'
connection_string = f'DRIVER={DRIVER};SERVER={SERVER};DATABASE={DATABASE};UID={USERNAME};PWD={PASSWORD};'
conn = pyodbc.connect(connection_string)
OperationalError: ('08001', '[08001] [Microsoft][ODBC Driver 18 for SQL Server]SSL Provider: [OpenSSL library could not be loaded, make sure OpenSSL 1.0, 1.1, or 3.0 is installed] (-1) (SQLDriverConnect)')
Running openssl version on the terminal yields:
OpenSSL 3.0.16 11 Feb 2025 (Library: OpenSSL 3.0.16 11 Feb 2025)
I can't find anything on the web to solve this.
Sign in to answer