开发者

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.

H开发者_JAVA技巧ow 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 :-[


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜