Can not import python modules when compiled against debug version of python
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Python can be compiled with a special debugging mode https://docs.python.org/devguide/setup.html#compiling-for-debugging. Example fedora provides python-debug that ships a new executable, library, and include directory with debugging options enabled.
When compiling VTK against the debug version of python the core dynamic modules fail to import. (e.g. below)
Traceback (most recent call last): File "", line 1, in File "/home/casey.goodlett/common/VTK-debug/Wrapping/Python/vtk/init.py", line 39, in from vtkCommonCore import * File "/home/casey.goodlett/common/VTK-debug/Wrapping/Python/vtk/vtkCommonCore.py", line 1, in from vtkCommonCorePython import * ImportError: No module named vtkCommonCorePython
This is because when compiled against the debug variant of python, the library is expected to be named vtkCommonCorePython_d.so instead of vtkCommonCorePython.so. (not sure if it should be vtkCommonCorePython or vtkCommonCorePythonD). A quick script to create symlinks for all those names enables vtk to import succesfully.
Possible solutions could be one of the following
a) provide symlinks needed for debug version b) detect compilation against debug python and rename libraries appropriately