import sqlite directly rather than rely on subprocess