There is a sqlite3 library that comes with python 2.7.3, but it is hardly the latest version.
I would like to upgrade it within a virtualenv environment. In other words, the upgrade only applies to the version of python installed within this virtualenv.
What is the correct way to do so?
The below works for me, but please comment if there is any room for improvement:
Activate the virtualenv to which you are going to install the latest
sqlite3Get the latest source of
pysqlitepackage from google code:wget http://pysqlite.googlecode.com/files/pysqlite-2.6.3.tar.gzCompile
pysqlitefrom source and together with the latestsqlitedatabase:python setup.py build_staticInstall it to the site-packages directory of the virtualenv:
python setup.py installThe above will actually install the
pysqliteintopath-to-virtualenv/lib/python2.7/site-packages, which is where all other pip-installed libraries are.Now, I have the latest version of
sqlite(compiled intopysqlite) installed within a virtualenv, so I can do:from pysqlite2 import dbapi2 as sqlite