[GRASS-dev] success compiling GRASS 7 trunk ... sort of

Glynn Clements glynn at gclements.plus.com
Fri Jul 25 22:19:31 EDT 2008


Michael Barton wrote:

> I trashed all of my files in GRASS trunk and rechecked out a new copy.  
> This time it compiled fine. Thanks for the suggestion.
> 
> 
> Now, however, the wxPython interface won't open. I get the following  
> error:
> 
> Fatal Python error: Interpreter not initialized (version mismatch?)
> 
> This happens in both develbranch_6 and trunk. I've checked to make  
> sure that I updated python and wxPython correctly, and have the newest  
> version. The wxGUI startup screen begins without any trouble and I  
> have no problems running any wxPython demo or example. Python imports  
> wx fine and the version is correct. I have not updated and recompiled  
> on my MacBook in the last 36 hours and so wonder if something has  
> changed in the source? Is anyone else having this problem?

PYTHONPATH?

>From http://www.geocities.com/foetsch/python/extending_python.htm

	Q. "Fatal Python error: Interpreter not initialized (version mismatch?)"
	
	A. This error occurs when the version of the Python interpreter for
	which the extension module has been built is different from the
	version of the interpreter that attempts to import the module.
	
	The header file python.h contains a #pragma directive that
	automatically links your DLL with the import libary for the Python
	interpreter DLL. If you have installed Python version 2.3, the LIB
	file is python23.lib and the required DLL is python23.dll.
	
	When the interpreter that performs the import is, say, version 2.2,
	you receive this error. You also receive the error when you attempt to
	import a Debug version of the extension DLL into a Release build of
	the interpreter.

If $PYTHONPATH contains directories for a specific version of Python,
but the "python" interpreter found in $PATH is a different version,
it's likely to load the wrong version of some extension, and fail.

Or if you're building extensions (e.g. vdigit) against a version other
than the one which "python"[1] uses, you'll have a similar problem.

[1] The wxgui script uses "python" rather than "$GRASS_PYTHON". Also,
scripts which are run directly will use "python". I'm not sure that
there's much point in having a GRASS_PYTHON variable (unlike
GRASS_WISH, as Tcl/Tk scripts were never executed directly).

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list