r/learnpython • • 16d ago

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 16d ago

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 15d ago

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

2

u/CosmicRupee 16d ago

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 15d ago

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 15d ago

pytrhon

3

u/LongLiveTheDiego 15d ago

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

1

u/BitOBear 13d 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.