[vtk-developers] VTK, Python 3 and the six module - install error on six.pyc

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon May 15 20:22:34 EDT 2017


On Mon, May 15, 2017 at 8:09 PM, Marcus D. Hanwell
<marcus.hanwell at kitware.com> wrote:
> I have been looking into this in the context of Tomviz, which uses
> Python 3, but was able to reproduce this in a vanilla VTK build tree.
> If you use Python 3 everything installs fine, but if you turn on
> Module_SixPython then I get the following install error:
>
> -- Installing: /usr/local/vtk/lib/cmake/vtk-7.1/Modules/SixPython.cmake
> -- Installing: /usr/local/vtk/lib/python3.5/site-packages/six.py
> CMake Error at ThirdParty/SixPython/cmake_install.cmake:40 (file):
>  file INSTALL cannot find "/home/marcus/build/vtk/Wrapping/Python/six.pyc".
> Call Stack (most recent call first):
>  cmake_install.cmake:104 (include)
>
> A quick grep turned up nothing obvious, but it would seem that other
> Python modules are correctly finding the pyc files in the __pycache__
> directories, but not so with six. Any pointers on where this logic
> might be, and why it might be breaking down for this very simple
> module.
>
Isn't it always the way, but I guess the major issue is that only a
few modules use vtk_module_python_package, and that CMake function
seems to have no idea about __pycache__ in Python 3, and is only just
starting to be used there with AutobahnPython and SixPython. I am
guessing when they were added make install wasn't tested with Python
3.

Aron, it looks like you added the Autobahn to Python 3, any chance
that the install target could be fixed? It seems like the
vtk_module_python_package function needs to be extended to deal with
__pycache__ when using Python 3 but people more knowledgeable in
Python-fu may have other ideas.

Thanks,

Marcus


More information about the vtk-developers mailing list