The Python Oracle

Building Python 2.5 with full Sqlite3 as a user on linux

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Luau

--

Chapters
00:00 Building Python 2.5 With Full Sqlite3 As A User On Linux
01:35 Accepted Answer Score 6
02:02 Thank you

--

Full question
https://stackoverflow.com/questions/8656...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #gcc #sqlite #sharedlibraries #pysqlite

#avk47



ACCEPTED ANSWER

Score 6


First download, build and install sqlite3 with a --prefix. Then build python with same prefix , it will find sqlite installation and will build _sqlite3 module.

$ mkdir -p ~/applications/src
$ cd ~/applications/src
$ wget http://www.sqlite.org/sqlite-autoconf-3070900.tar.gz
$ tar xvvf sqlite-autoconf-3070900.tar.gz
$ cd sqlite-autoconf-3070900
$ ./configure --prefix=~/applications
$ make
$ make install

$ cd ~/applications/src
$ wget http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tgz
$ tar xvvf Python-2.5.2.tgz
$ cd Python-2.5.2
$ ./configure --prefix=~/applications
$ make
$ make install

$ ~/applications/bin/python
>>> import sqlite3
>>> # no error!