0

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
Vivek Goel
  • 22,942
  • 29
  • 114
  • 186
  • It's not so helpful to change your question this much; answerers do not get notified of the changes. Better use a new post next time to ask a new question. – Martijn Pieters Jul 17 '12 at 06:31
  • possible duplicate of [How can I upgrade the sqlite3 package in Python 2.6?](http://stackoverflow.com/questions/3333095/how-can-i-upgrade-the-sqlite3-package-in-python-2-6) – Martijn Pieters Jul 17 '12 at 06:35
  • @MartijnPieters ok I will close this question and start another one. First I thought it sqlite version problem but as you told that is module version not sqlite. Then I checked for other problems. – Vivek Goel Jul 17 '12 at 06:36
  • No need to close it now; I've already altered my answer too. :-) – Martijn Pieters Jul 17 '12 at 06:36
  • possible duplicate of [force python to forego native sqlite3 and use the (installed) latest sqlite3 version](http://stackoverflow.com/q/1545479) – Martijn Pieters Jul 17 '12 at 07:38

1 Answers1

1

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?

Community
  • 1
  • 1
Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343