public inbox for
 help / color / mirror / Atom feed
From: Martin Carpenter <>
Subject: Python: enable loadable SQLite extension support
Date: Fri, 28 Oct 2022 17:45:26 +0200	[thread overview]
Message-ID: <> (raw)


Can I please request that the Python 3 package be compiled with "

I'm trying to use a Python 3 app (datasette) to load an SQLite
extension but it fails with:

AttributeError: 'sqlite3.Connection' object has no attribute

The Python docs say that --enable-loadable-sqlite-extensions should be
passed at build to enable this (new for 3.6) . See:


The shipped sqlite3 supports extensions (".load" works).
Python's sysconfig module shows that Python 3.9.10 on Cygwin does not
have this feature enabled:

>>> import sysconfig
>>> list(filter(lambda x: 'enable' in x,
sysconfig.get_config_vars('CONFIG_ARGS')[0].split(' ')))
["'--enable-shared'", "'--enable-ipv6'"]

For comparison, Python 3.8.10 on Ubuntu 20.04:

>>> list(filter(lambda x: 'enable' in x,
sysconfig.get_config_vars('CONFIG_ARGS')[0].split(' ')))
["'--enable-shared'", "'--enable-ipv6'", "'--enable-loadable-sqlite-

Equivalent issue from NixOS for reference:



             reply	other threads:[~2022-10-28 15:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28 15:45 Martin Carpenter [this message]
2023-03-09 22:49 ` Marco Atzeri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).