1

I have installed the SQLite database.Its version is 3.8.2.But when I am running the Python Script the version comes out to be 3.6.21.My Python code is:

#!/Python27/python
# -*- coding: utf-8 -*-
import sqlite3 as lite
import sys
con = None
try:
 con = lite.connect('test.db')
 cur = con.cursor()
 cur.execute('SELECT SQLITE_VERSION()')
 data = cur.fetchone()
 print "SQLite version: %s" % data
except lite.Error, e:
 print "Error %s:" % e.args[0]
 sys.exit(1)
finally:
 if con:
 con.close()

As such there's no error with my code.

Torxed
23.6k15 gold badges91 silver badges135 bronze badges
asked Mar 27, 2014 at 7:11
1
  • How did you create this database? If you create it in the same script and run the same SQL query from your sqlite command line tool, will it produce different version then? or is it limited to when you create it via command-line and then do the above? Commented Mar 27, 2014 at 7:14

1 Answer 1

1

SQLite is an embedded database; there is no server.

Python uses its own copy of the SQLite library. To upgrade that, you must upgrade Python, or compile your own Python version.

answered Mar 27, 2014 at 8:13
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.