Sporadic errors when building TVTK classes
yoda-vid opened this issue · 3 comments
I've been encountering sporadic installation errors the Building TVTK classes
step. It occurs on at least Windows and macOS, both locally and in our CI. The error appears to resemble those I've seen in the Mayavi CI (eg https://github.com/enthought/mayavi/actions/runs/4081565144/jobs/7042041456#step:5:4492 and https://github.com/enthought/mayavi/actions/runs/4149642172/jobs/7178740011#step:5:4492).
Here is the error output on macOS 12.6, Python 3.8:
Building wheel for mayavi (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for mayavi (pyproject.toml) did not run successfully.
│ exit code: -11
╰─> [37 lines of output]
running bdist_wheel
running build
Building tvtk_classes.zip
----------------------------------------------------------------------
Deleting possibly old TVTK classes
Building TVTK classes... Fatal Python error: Segmentation fault
Current thread 0x0000000103970600 (most recent call first):
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-install-d759w36u/mayavi_77d97eab51f6484384d0a9226cd2cc70/tvtk/vtk_parser.py", line 711 in _find_get_set_methods
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-install-d759w36u/mayavi_77d97eab51f6484384d0a9226cd2cc70/tvtk/vtk_parser.py", line 491 in _organize_methods
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-install-d759w36u/mayavi_77d97eab51f6484384d0a9226cd2cc70/tvtk/vtk_parser.py", line 157 in parse
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-install-d759w36u/mayavi_77d97eab51f6484384d0a9226cd2cc70/tvtk/wrapper_gen.py", line 341 in _gen_methods
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-install-d759w36u/mayavi_77d97eab51f6484384d0a9226cd2cc70/tvtk/wrapper_gen.py", line 242 in generate_code
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-install-d759w36u/mayavi_77d97eab51f6484384d0a9226cd2cc70/tvtk/code_gen.py", line 235 in _write_wrapper_class
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-install-d759w36u/mayavi_77d97eab51f6484384d0a9226cd2cc70/tvtk/code_gen.py", line 142 in generate_code
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-install-d759w36u/mayavi_77d97eab51f6484384d0a9226cd2cc70/tvtk/setup.py", line 98 in gen_tvtk_classes_zip
File "<string>", line 273 in build_tvtk_classes_zip
File "<string>", line 287 in run
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-build-env-d6r7hhzi/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988 in run_command
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-build-env-d6r7hhzi/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 1213 in run_command
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-build-env-d6r7hhzi/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318 in run_command
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-build-env-d6r7hhzi/overlay/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 325 in run
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-build-env-d6r7hhzi/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988 in run_command
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-build-env-d6r7hhzi/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 1213 in run_command
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-build-env-d6r7hhzi/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969 in run_commands
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-build-env-d6r7hhzi/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201 in run_commands
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-build-env-d6r7hhzi/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185 in setup
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-build-env-d6r7hhzi/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 108 in setup
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-build-env-d6r7hhzi/overlay/lib/python3.8/site-packages/numpy/distutils/core.py", line 171 in setup
File "<string>", line 432 in <module>
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-build-env-d6r7hhzi/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 335 in run_setup
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-build-env-d6r7hhzi/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 484 in run_setup
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-build-env-d6r7hhzi/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 398 in _build_with_temp_dir
File "/private/var/folders/xc/yl9qgs0s77z7lvnz5q89tsd00000gn/T/pip-build-env-d6r7hhzi/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 413 in build_wheel
File "/Users/david/mayavi/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261 in build_wheel
File "/Users/david/mayavi/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345 in main
File "/Users/david/mayavi/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363 in <module>
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for mayavi
And similar errors in our CI on Windows (Python 3.7 run and 3.8 run).
Seems to happen more locally when my system is under load but haven't found a way to reproduce it consistently. I also don't recall seeing it with VTK 9.1.0.
Workaround has been to rerun the installation. Is this a known issue? If so, are there other workarounds? Thanks for your help!
I encountered the same issue when installing it for a Conda environment in a Docker Image
Pip subprocess error:
error: subprocess-exited-with-error
× Building wheel for mayavi (pyproject.toml) did not run successfully.
│ exit code: -11
╰─> [37 lines of output]
running bdist_wheel
running build
Building tvtk_classes.zip
----------------------------------------------------------------------
Deleting possibly old TVTK classes
Building TVTK classes... Fatal Python error: Segmentation fault
Current thread 0x00007f9442657740 (most recent call first):
File "/tmp/pip-install-pb4yw4u8/mayavi_46618e1168724ed1afff32bde4b5764b/tvtk/vtk_parser.py", line 711 in _find_get_set_methods
File "/tmp/pip-install-pb4yw4u8/mayavi_46618e1168724ed1afff32bde4b5764b/tvtk/vtk_parser.py", line 491 in _organize_methods
File "/tmp/pip-install-pb4yw4u8/mayavi_46618e1168724ed1afff32bde4b5764b/tvtk/vtk_parser.py", line 157 in parse
File "/tmp/pip-install-pb4yw4u8/mayavi_46618e1168724ed1afff32bde4b5764b/tvtk/wrapper_gen.py", line 341 in _gen_methods
File "/tmp/pip-install-pb4yw4u8/mayavi_46618e1168724ed1afff32bde4b5764b/tvtk/wrapper_gen.py", line 242 in generate_code
File "/tmp/pip-install-pb4yw4u8/mayavi_46618e1168724ed1afff32bde4b5764b/tvtk/code_gen.py", line 235 in _write_wrapper_class
File "/tmp/pip-install-pb4yw4u8/mayavi_46618e1168724ed1afff32bde4b5764b/tvtk/code_gen.py", line 142 in generate_code
File "tvtk/setup.py", line 98 in gen_tvtk_classes_zip
File "<string>", line 273 in build_tvtk_classes_zip
File "<string>", line 287 in run
File "/tmp/pip-build-env-sdf612bq/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988 in run_command
File "/tmp/pip-build-env-sdf612bq/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 1221 in run_command
File "/tmp/pip-build-env-sdf612bq/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318 in run_command
File "/tmp/pip-build-env-sdf612bq/overlay/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 343 in run
File "/tmp/pip-build-env-sdf612bq/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988 in run_command
File "/tmp/pip-build-env-sdf612bq/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 1221 in run_command
File "/tmp/pip-build-env-sdf612bq/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969 in run_commands
File "/tmp/pip-build-env-sdf612bq/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201 in run_commands
File "/tmp/pip-build-env-sdf612bq/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185 in setup
File "/tmp/pip-build-env-sdf612bq/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 108 in setup
File "/tmp/pip-build-env-sdf612bq/overlay/lib/python3.8/site-packages/numpy/distutils/core.py", line 171 in setup
File "<string>", line 432 in <module>
File "/tmp/pip-build-env-sdf612bq/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 335 in run_setup
File "/tmp/pip-build-env-sdf612bq/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 484 in run_setup
File "/tmp/pip-build-env-sdf612bq/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 398 in _build_with_temp_dir
File "/tmp/pip-build-env-sdf612bq/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 413 in build_wheel
File "/opt/conda/envs/Tensorflow_env_PY38/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251 in build_wheel
File "/opt/conda/envs/Tensorflow_env_PY38/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335 in main
File "/opt/conda/envs/Tensorflow_env_PY38/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353 in <module>
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
Which version of VTK is this failing with, I am fixing some issues with 9.2..6 currently.
Should be fixed in master with the merge of #1199.