Skip to content Skip to sidebar Skip to footer

Sqlite3 Is Not Be Able To Import In Python 3

sqlite is working fine with python 2.7 but when I am trying to import this in python 3 it gives error > Traceback (most recent call last): File 'dbConnection.py', line 1, >

Solution 1:

sqlite3 is an optional part of the standard library. It is compiled when you compile and install Python 3, but only if the right sqlite3 include files (development headers) are available.

If you compiled and installed Python 3 yourself, install the dependencies (libsqlite3-dev or sqlite-devel or similar, depending on your Linux distribution, for example), then re-compile and re-install Python 3.

Externally, the library is maintained as pysqlite; but that release doesn't support Python 3. Even then, to install it you'll still need those sqlite development files, and you'd need to port it to Python 3. You may as well just re-compile Python 3.

Post a Comment for "Sqlite3 Is Not Be Able To Import In Python 3"