configuring python with disable-thread in Ubuntu

Gerhard Häring gh at ghaering.de
Fri May 8 02:40:40 EDT 2009


Deepak Chandran wrote:
> Hello, 
> 
> I am embedding python inside a C++ program. For some reason (I think
> libxml2), I am getting Segmentation fault at PyThread_release_lock. 
> 
> The solution I found online was to configure python with --disable-thread.

That doesn't sound like a solution, but like a kludge.

> I used "apt-get install python-dev" to install python. 
> How do I re-configure it using the --disable-thread option?

You don't want your system Python to be built with "--disable-thread".
Other utilities might depend on threads being available in Python.

If you really want to go this route, download Python from python.org and
build it from source with the required options to "./configure".

-- Gerhard




More information about the Python-list mailing list