I am struggling to get the Python module sqlite3 to work. I found this, and am following it, since Python can't seem to find the modules even after installation of the packages.

I tried following this walkthrough to recompile Python 2.7.2, but the sym-link step didn't work, giving me this error:

`ln: failed to create symbolic link `/usr/local/bin/python2.7': File exists`

Any input as to go about solving this would be much appreciated.

  • "I am struggling to get the Python module sqlite3 to work." This baffles me. SQLite is built-in in Python. This means you should not install any Python-SQLite modules. I suggest you ask a question about your specific issue with it instead.
    – gertvdijk
    Commented May 13, 2013 at 14:13

1 Answer 1


I would suggest that whatever problem you have it will not be solved by recompiling the python version. Python 2.7.x is standard on Ubuntu 12.04 and is used by many Ubuntu utils, I would not advise trying to install a recompiled version over it.

As gertvdijk suggests, a more specific description of the problem may help.

Can you try starting the python interpreter by opening a terminal window and typing:

Python 2.7.4 (default, Apr 19 2013, 18:28:01) 
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

When the intepreter starts, then type

>>>import sqlite3

If you get no response (other than a newline here) then python has access to sqlite module.

If you get some error output, post it here, and we can take it from there.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .