Fatal Python error: Interpreter not initialized (version mismatch?)

Fredrik Lundh fredrik at effbot.org
Tue Jan 30 16:29:27 EST 2001


Dan Parisien wrote:
> If I do not use a thread for the server loop, it does not give the error.
> The method is called fine, the data decrypted, then unpickled and life is
> good. There is a problem however... I have no ____ing clue why that
> happens. Does anyone in python devel know what triggers that error msg?

it's triggered if Py_InitModule is called (usually by an extension
module) before the interpreter itself has been initialized.

on Windows, this can happen if a new version of the interpreter
picks up an extension linked against an older version of the Python
DLL, and that DLL is still present.  The runtime linker will then load
the old DLL (without calling Py_Initialize), and the module ends up
calling the wrong version of Py_InitModule, in an uninitialized DLL.

Cheers /F





More information about the Python-list mailing list