Sqlite3 with python

From Icbwiki

Jump to: navigation, search

How to let python work with sqlite3 python2.5 and later comes bundled with pysqlite which is an interface to sqlite3(a c database engine library). So we need to install sqlite3 first and then install python upon it.


install sqlite3

curl http://www.sqlite.org/sqlite-amalgamation-3.5.6.tar.gz -o sqlite-amalgamation-3.5.6.tar.gz
tar -xzvf sqlite-amalgamation-3.5.6.tar.gz
cd  sqlite-3.5.6
./configure --prefix=/home/xud2002/python2.6/
make
make install


install pyton

cd  cd Python-2.5.1
./configure --prefix=/home/xud2002/python2.6/
make
make altinstall

to invoke the newly installed python, put the python executable into path

cp /home/xud2002/python2.6/bin/python2.6 ~/bin/

then invoke the new python by typing python2.6

Personal tools