r/learnpython • • Nov 01 '26

no module sqlite

Hi i’m in python trying to learn . I have the SQlite extension but it’s telling me no module name found sqlite . when trying to run the is line

import sqlite

i’ve also tried import sqlite3

1 Upvotes

11 comments sorted by

View all comments

4

u/atarivcs Nov 01 '26

The actual module name is sqlite3, not sqlite

Also, sqlite3 is is built in to python, so I'm not sure what you mean by "SQlite extension". You shouldn't need any extension.

4

u/OkTill2666 Nov 02 '26

the 3 at the end trips up so many beginners tbh, its an easy mistake to make.

2

u/CosmicRupee Nov 01 '26

i just have it installed at this point because i wasn’t sure why the below command wasn’t working

import sqlite3

2

u/acw1668 Nov 02 '26

i just have it installed

How did you install the module sqlite3?

It is better to provide more information:

  • OS platform
  • Python version
  • the full error traceback

-3

u/CosmicRupee Nov 02 '26

pytrhon

3

u/LongLiveTheDiego Nov 02 '26

Everyone knows you're talking about Python, they asked a completely different question.

1

u/BitOBear 28d ago

If he's on a Linux box and he built the python interpreter himself without the SQ light three package with development headers installed python will skip making that module as part of its standard build.

Some distros break down those elements for the people who don't want them so if he used like at install python there may be an app install python-sqlite3 sub package to install etc.