Python sqlite3.Connection object has no attribute 'enable_load_extension

Jul 31, 2019
pyenv compile with --enable-loadable-sqlite-extensions

I install Python 3.7.4 using pyenv, but trying to run Connection.enable_load_extension raise AttributeError: 'sqlite3.Connection' object has no attribute 'enable_load_extension'.

import sqlite3conn = sqlite3.connect('test.db')conn.enable_load_extension(True)

To solve this problem, need to build python with --enable-loadable-sqlite-extensions.

CONFIGURE_OPTS=--enable-loadable-sqlite-extensions pyenv install 3.7.4

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.