Vivek Goel
Vivek Goel

Reputation: 24150

Installing pysqlite in python with sqlite 3 version with custom file header

I wan to compile sqlite with custom file header I followed the step given here http://trac.edgewall.org/wiki/PySqlite

Download pysqlite 
Extract it 
export  CFLAGS="-DSQLITE_FILE_HEADER=\\\"vivek\\\"" 
Run  python   setup.py build_static 
python   setup.py install  -f

But when run python and check sqlite version

>>> import sqlite3
>>> sqlite3.version
'2.6.0'

It is giving old version of sqlite. I think it should be 3. I tried opening the database but I am getting error

 sqlite3.DatabaseError: file is encrypted or is not a database


Python Version

python --version
Python 2.7.3

Upvotes: 0

Views: 4457

Answers (1)

Martijn Pieters
Martijn Pieters

Reputation: 1122342

From the top of the PySqlite page on the Trac site:

If you're using Python 2.5 and up, you already have a working version of pysqlite 2, bundled as sqlite3. You can stop here ;-)

You are using python 2.7, so there is no need to install a custom version. pysqlite comes bundled with your python version already.

pysqlite is the "glue" that makes sqlite available to python. Your system sqlite itself needs to be upgraded, not the glue library.

See How can I upgrade the sqlite3 package in Python 2.6?

Upvotes: 1

Related Questions