Код: Выделить всё
❯ ls /usr/local/lib
libsqlite3.dylib sqlite3
Код: Выделить всё
import os
import sqlite3
# Ensure the library path is set
os.environ['DYLD_LIBRARY_PATH'] = '/usr/local/lib'
def check_sqlite_version():
conn = sqlite3.connect(':memory:')
cursor = conn.cursor()
cursor.execute('SELECT sqlite_version();')
version = cursor.fetchone()[0]
print(f"SQLite version: {version}")
conn.close()
check_sqlite_version()
Подробнее здесь: https://stackoverflow.com/questions/791 ... hon-script