Skip to content

Python py3k install import bug

David Gobbi requested to merge dgobbi/vtk:python-py3k-install-import into master

The Python vtk module was failing to import the installed extension modules with Python 3, because relative imports now require a leading ".". This problem did not show up on the dashboard, because the dash builds run their tests on the build directory (where the vtkpython executable has a baked-in PYTHONPATH) but not on the installed programs and modules.

The try/except used in this patch is not an ideal solution, and I would rather that the extension modules were placed in Wrapping/Python/vtk/ during the build, but the required Build/Debug subdirs for Visual Studio make that impossible.

Merge request reports