Windows python users update your SQLITE3

If you are a python developer and using any of the Microsoft Windows operating system then this is very important for you to read, Linux users you dont have to worry about anything, python is fully updated for you!!

If you are using SQLITE3 in your project please make sure that you update your SQLITE3. Older version of SQLITE3 can stop your application from working in the middle of proper execution. If the database is created using newer SQLITE software of some sort and you try to use it using older SQLITE3 in your python on windows you may get an exception like this
sqlite3.OperationalError: unable to open database file
or
sqlite3.DatabaseError: file is encrypted or is not a database

You can check your version of SQLITE3 using following commands on your python interpreter.

[sdeshmukh@localhost ~] $ python
Python 2.7.8 (default, Nov 10 2014, 08:19:18)
[GCC 4.9.2 20141101 (Red Hat 4.9.2-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> sqlite3.version
'2.6.0'
>>> sqlite3.sqlite_version
'3.8.8'
>>>

So to avoid errors and be sure that your application runs flawlessly here are simple steps to upgrade your python windows SQLITE3.

1. Download appropriate dll files from Precompiled Binaries for Windows section of this page.  Please download either 32bit or 64bit according to your hardware achitecture.

2. Once downloaded extract the zip file. Now copy the file named sqlite3.dll and paste this into  dlls folder in  your python installtion directory. Note that you will have to replace the existing file in the directory. As shown here is mine path of python installation directory

C:\Python27\DLLs\

That’s it. You have just upgraded your python SQLITE3 and now your application will run flawlessly without any errors.

Advertisements

3 thoughts on “Windows python users update your SQLITE3

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s