You don't need to install sqlite3 module. It is included in the standard library (since Python 2.5).
» pip install db-sqlite3
How do I install SQLite?
Install SQLite3 on Python 3
That error means that you didn't have the SQLite development package installed when you built Python. The sqlite3 binary CLI program is totally irrelevant; Python does not use that, and its presence does not mean you have the correct package installed. The necessary package is libsqlite3-dev. You don't need --enable-loadable-sqlite-extensions.
» pip install pysqlite3
I clicked on its official link at the Django doc and it led me to a confusing site. How do I navigate it?
» pip install sqlite-database
Hello, world.
I've just bought a new Ubuntu 16.04 server and I want to host some programs. I use sqlite3 module in all my programs. I compiled last version of Python, Python 3.6, from sources but when I try to import sqlite3 I have this error:
>>> import sqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "/usr/local/lib/python3.6/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'I have tried to recompile Python with --enable-loadable-sqlite-extensions argument, I have installed sqlite3 cli, I have done ALL things found in internet, and I lose 4 hours of my time. Thanks for help.
EDIT: SQLite is working fine on Python 2.x
That error means that you didn't have the SQLite development package installed when you built Python. The sqlite3 binary CLI program is totally irrelevant; Python does not use that, and its presence does not mean you have the correct package installed. The necessary package is libsqlite3-dev. You don't need --enable-loadable-sqlite-extensions.
Isn't Python 3.6 available from your package manager?