Swig compiling issues Mac Os Lion
One problem that happened to me, was the fact that working under a virtualenv with an specific python version as one can expect, works with ONLY that python version. So if you try to import a module compiled with one version different with the one you are running, will no work. The exception message: Fatal Python error: Interpreter not initialized (version mismatch?) Abort trap: 6 How we can solve this issue? First, knowing which python version are we running and of course, compile the module to THAT version. Below are some examples of how to compile a module to 2.6 or 2.7 (which is Mac Os Lion python default version) To use python default version just type the following: $ swig -python example.i $ cc -c `python-config --cflags` example.c example_wrap.c $ cc -bundle `python-config --ldflags` example.o example_wrap.o -o _example.so If you run: $ python-config --ldflags the output is: -L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -ldl -framework...