enthought / mayavi

3D visualization of scientific data in Python
http://docs.enthought.com/mayavi/mayavi/
Other
1.28k stars 282 forks source link

legacy-install-failure for Mayavi on multiple Python versions #1179

Closed Davide-sd closed 1 year ago

Davide-sd commented 1 year ago

I'm trying to build a package that depends on Mayavi, sadly I keep getting this error on all builds (Python 3.8, 3.9, 3.10). Note that I haven't changed my workflows in months, so I expected it to work...

  × Running setup.py install for mayavi did not run successfully.
  │ exit code: -11
  ╰─> [167 lines of output]
      /tmp/pip-install-rm0gm65i/mayavi_cd5156c8456d4c39be55f273a9de87e8/setup.py:13: DeprecationWarning:

        `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
        of the deprecation of `distutils` itself. It will be removed for
        Python >= 3.12. For older Python versions it will remain present.
        It is recommended to use `setuptools < 60.0` for those Python versions.
        For more details, see:
          https://numpy.org/devdocs/reference/distutils_status_migration.html

        from numpy.distutils.command import build, install_data
      running install
      running build
      ----------------------------------------------------------------------
      Deleting possibly old TVTK classes
      Building TVTK classes... vtkAnimationCue: Ignoring method: Get/SetDirection
      default: 1, range: None
      vtkContextDevice2D: Ignoring method: Get/SetViewportRect
      default: [-1, 2146435071, -1, 2146435071], range: None
      vtkContextDevice2D: Ignoring method: Get/SetViewportSize
      default: [-1, 2146435071], range: None
      vtkEventDataForDevice: Ignoring method: Get/SetAction
      default: -1, range: None
      vtkEventDataForDevice: Ignoring method: Get/SetDevice
      default: -1, range: None
      vtkFXAAOptions: Ignoring method: Get/SetDebugOptionValue
      default: 0, range: None
      vtkIncrementalForceLayout: Ignoring method: Get/SetGravityPoint
      default: [200.0, 200.0], range: None
      vtkOpenGLBufferObject: Ignoring method: Get/SetType
      default: 0, range: None
      vtkOpenGLFXAAFilter: Ignoring method: Get/SetDebugOptionValue
      default: 0, range: None
      vtkRenderWidget: Ignoring method: Get/SetPosition
      default: [0, 0], range: None
      vtkRenderWidget: Ignoring method: Get/SetSize
      default: [300, 300], range: None
      vtkShader: Ignoring method: Get/SetType
      default: 3, range: None
      vtkVolumeTexture: Ignoring method: Get/SetPartitions
      default: [1, 1, 1], range: None
      vtkChartMatrix: Ignoring method: Get/SetFillStrategy
      default: 0, range: None
      vtkChartMatrix: Ignoring method: Get/SetGutter
      default: [15.0, 15.0], range: None
      vtkChartMatrix: Ignoring method: Get/SetRect
      default: [0, 0, 100, 100], range: None
      vtkChartMatrix: Ignoring method: Get/SetSize
      default: [0, 0], range: None
      vtkContextArea: Ignoring method: Get/SetDrawAreaBounds
      default: [0.0, 0.0, 300.0, 300.0], range: None
      vtkContextArea: Ignoring method: Get/SetDrawAreaResizeBehavior
      default: 0, range: None
      vtkContextArea: Ignoring method: Get/SetFixedMargins
      default: [0, 0, 0, 0], range: None
      vtkContextArea: Ignoring method: Get/SetFixedRect
      default: [0, 0, 300, 300], range: None
      vtkContextArea: Ignoring method: Get/SetGeometry
      default: [0, 0, 300, 300], range: None
      vtkImplicitProjectOnPlaneDistance: Ignoring method: Get/SetNorm
      default: 2, range: None
      vtkOpenGLVertexBufferObject: Ignoring method: Get/SetCoordShiftAndScaleMethod
      default: 0, range: None
      vtkSimple3DCirclesStrategy: Ignoring method: Get/SetMarkedValue
      default: (invalid), range: None
      vtkArrayNorm: Ignoring method: Get/SetWindow
      default: [0, 9223372036854775807), range: None
      vtkChart: Ignoring method: Get/SetSize
      default: [0.0, 0.0, 0.0, 0.0], range: None
      vtkChartXYZ: Ignoring method: Get/SetAxisColor
      default: [0, 0, 0, 255], range: None
      vtkEuclideanClusterExtraction: Radius not updatable (VTK 9.1 bug - value not properly initialized)
      Warning: We cannot determine the trait type of vtkHigherOrderHexahedron.Order
      Warning: We cannot determine the trait type of vtkHigherOrderQuadrilateral.Order
      Warning: We cannot determine the trait type of vtkHigherOrderWedge.Order
      vtkHyperTreeGridPreConfiguredSource: Ignoring method: Get/SetCustomArchitecture
      default: 0, range: None
      vtkHyperTreeGridPreConfiguredSource: Ignoring method: Get/SetHTGMode
      default: 0, range: None
      vtkLightingMapPass: Ignoring method: Get/SetRenderType
      default: 0, range: None
      vtkPlot: Ignoring method: Get/SetShiftScale
      default: [0.0, 0.0, 1.0, 1.0], range: None
      vtkScatterPlotMatrix: Ignoring method: Get/SetActivePlot
      default: [0, -2], range: None
      vtkScatterPlotMatrix: Ignoring method: Get/SetScatterPlotSelectedActiveColor
      default: [0, 204, 0, 102], range: None
      vtkScatterPlotMatrix: Ignoring method: Get/SetScatterPlotSelectedRowColumnColor
      default: [204, 0, 0, 102], range: None
      vtkScatterPlotMatrix: Ignoring method: Get/SetSize
      default: [0, 0], range: None
      vtkSparseArray_I10vtkVariantE: Ignoring method: Get/SetExtents
      default: , range: None
      vtkSparseArray_I10vtkVariantE: Ignoring method: Get/SetNullValue
      default: (invalid), range: None
      vtkSparseArray_I12vtkStdStringE: Ignoring method: Get/SetExtents
      default: , range: None
      vtkSparseArray_IaE: Ignoring method: Get/SetExtents
      default: , range: None
      vtkSparseArray_IcE: Ignoring method: Get/SetExtents
      default: , range: None
      vtkSparseArray_IdE: Ignoring method: Get/SetExtents
      default: , range: None
      vtkSparseArray_IfE: Ignoring method: Get/SetExtents
      default: , range: None
      vtkSparseArray_IhE: Ignoring method: Get/SetExtents
      default: , range: None
      vtkSparseArray_IiE: Ignoring method: Get/SetExtents
      default: , range: None
      vtkSparseArray_IjE: Ignoring method: Get/SetExtents
      default: , range: None
      vtkSparseArray_IlE: Ignoring method: Get/SetExtents
      default: , range: None
      vtkSparseArray_ImE: Ignoring method: Get/SetExtents
      default: , range: None
      vtkSparseArray_IsE: Ignoring method: Get/SetExtents
      default: , range: None
      vtkSparseArray_ItE: Ignoring method: Get/SetExtents
      default: , range: None
      vtkSparseArray_IxE: Ignoring method: Get/SetExtents
      default: , range: None
      vtkSparseArray_IyE: Ignoring method: Get/SetExtents
      default: , range: None
      vtkThresholdTable: Ignoring method: Get/SetMaxValue
      default: 2147483647, range: None
      vtkThresholdTable: Ignoring method: Get/SetMinValue
      default: 0, range: None
      vtkTransferAttributes: Ignoring method: Get/SetDefaultValue
      default: 1, range: None
      Bad to call vtkUniformHyperTreeGrid::GetXCoordinates
      Bad to call vtkUniformHyperTreeGrid::GetYCoordinates
      Bad to call vtkUniformHyperTreeGrid::GetZCoordinates
      vtkChartBox: Ignoring method: Get/SetSize
      default: [0.0, 0.0, 0.0, 0.0], range: None
      vtkColorLegend: Ignoring method: Get/SetPosition
      default: [0.0, 0.0, 0.0, 0.0], range: None
      Warning: We cannot determine the trait type of vtkImageMask.MaskedOutputValue
      vtkMolecule: Ignoring method: Get/SetLatticeOrigin
      default: [0.0, 0.0, 0.0], range: None
      vtkPOpenFOAMReader: Ignoring method: Get/SetCaseType
      default: 1, range: None
      Fatal Python error: Segmentation fault

      Current thread 0x00007fa21d5c8740 (most recent call first):
        File "/tmp/pip-install-rm0gm65i/mayavi_cd5156c8456d4c39be55f273a9de87e8/tvtk/vtk_parser.py", line 705 in _find_get_set_methods
        File "/tmp/pip-install-rm0gm65i/mayavi_cd5156c8456d4c39be55f273a9de87e8/tvtk/vtk_parser.py", line 488 in _organize_methods
        File "/tmp/pip-install-rm0gm65i/mayavi_cd5156c8456d4c39be55f273a9de87e8/tvtk/vtk_parser.py", line 154 in parse
        File "/tmp/pip-install-rm0gm65i/mayavi_cd5156c8456d4c39be55f273a9de87e8/tvtk/wrapper_gen.py", line 341 in _gen_methods
        File "/tmp/pip-install-rm0gm65i/mayavi_cd5156c8456d4c39be55f273a9de87e8/tvtk/wrapper_gen.py", line 242 in generate_code
        File "/tmp/pip-install-rm0gm65i/mayavi_cd5156c8456d4c39be55f273a9de87e8/tvtk/code_gen.py", line 235 in _write_wrapper_class
        File "/tmp/pip-install-rm0gm65i/mayavi_cd5156c8456d4c39be55f273a9de87e8/tvtk/code_gen.py", line 142 in generate_code
        File "/tmp/pip-install-rm0gm65i/mayavi_cd5156c8456d4c39be55f273a9de87e8/tvtk/setup.py", line 98 in gen_tvtk_classes_zip
        File "/tmp/pip-install-rm0gm65i/mayavi_cd5156c8456d4c39be55f273a9de87e8/setup.py", line 254 in build_tvtk_classes_zip
        File "/tmp/pip-install-rm0gm65i/mayavi_cd5156c8456d4c39be55f273a9de87e8/setup.py", line 268 in run
        File "/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/distutils/dist.py", line 985 in run_command
        File "/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/distutils/cmd.py", line 313 in run_command
        File "/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/distutils/command/install.py", line 546 in run
        File "/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/site-packages/numpy/distutils/command/install.py", line 34 in setuptools_run
        File "/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/site-packages/numpy/distutils/command/install.py", line 60 in run
        File "/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/distutils/dist.py", line 985 in run_command
        File "/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/distutils/dist.py", line 966 in run_commands
        File "/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/distutils/core.py", line 148 in setup
        File "/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/site-packages/setuptools/__init__.py", line 153 in setup
        File "/opt/hostedtoolcache/Python/3.9.14/x64/lib/python3.9/site-packages/numpy/distutils/core.py", line 169 in setup
        File "/tmp/pip-install-rm0gm65i/mayavi_cd5156c8456d4c39be55f273a9de87e8/setup.py", line 401 in <module>
        File "<pip-setuptools-caller>", line 34 in <module>
        File "<string>", line 2 in <module>
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> mayavi

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Error: Process completed with exit code 1.
JAGulin commented 1 year ago

There are similar issues, perhaps check out #1176

kybowm commented 1 year ago

My github workflow suddenly started failing with the same issue. From other issues in this repo, I figured it was a VTK issue. Sure enough, VTK 9.2.2 fails, but VTK 9.2.0rc2 works.

Tl;dr; Try pip install VTK==9.2.0rc2 followed by pip install mayavi.

prabhuramachandran commented 1 year ago

I have just pushed a new 4.8.1 release that should hopefully fix this issue. Am closing this ticket for now, please reopen if the issues persist.