开发者

Local installation of python

开发者 https://www.devze.com 2022-12-17 21:13 出处:网络
I want to install python to my local direcotory: ./configure --prefix=/home/alex/local-install && make && make install

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

精彩评论

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