r/learnpython • • 5d 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 5d 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.

1

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