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
5
  • 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. Commented Jul 17, 2012 at 6:31
  • possible duplicate of How can I upgrade the sqlite3 package in Python 2.6? Commented Jul 17, 2012 at 6: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. Commented Jul 17, 2012 at 6:36
  • No need to close it now; I've already altered my answer too. :-) Commented Jul 17, 2012 at 6:36
  • possible duplicate of force python to forego native sqlite3 and use the (installed) latest sqlite3 version Commented Jul 17, 2012 at 7:38

1 Answer 1

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?

Sign up to request clarification or add additional context in comments.

5 Comments

I am getting error sqlite3.DatabaseError: file is encrypted or is not a database
That's a different problem then; what python version are you on in any case?
one more thing I am compiling sqlite with custom file header. python version 2.7.3
stackoverflow.com/questions/1545479/… This is more better answer.
Glad you found something that helped! You didn't specify what platform you were on so I picked one for you before.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.