alexdup
alexdup

Reputation: 21

Local installation of python

I want to install python to my local direcotory:

./configure --prefix=/home/alex/local-install && make && make install

When i import sqlite3 i get the following:

ImportError: No module named _sqlite3

the reason: there is no _sqlite3.so in /home/alex/local-install/lib/python2.6/lib-dynload.

How can i force python to build bindings for sqlite and other libraries (zlib for example)?

P.S. By the way: if i install sqlite3 to my local directory /home/alex/local-install before installing python - import sqlite3 works fine. That could be a solution: but in that case i have to install manually lots of libraries those i want to bind with python. Brrrrr :-[

Upvotes: 2

Views: 1791

Answers (1)

Peter Eisentraut
Peter Eisentraut

Reputation: 36759

You need to install the development headers and libraries for sqlite somewhere where the Python build can find them. You didn't say what OS you have. On Linux you usually have to install additional -dev[el] packages to be able to build against a library.

Upvotes: 3

Related Questions