mayavi icon indicating copy to clipboard operation
mayavi copied to clipboard

pip install fails to build tvtk classes on Ubuntu-22.04 wsl2 instance

Open gdcs92 opened this issue 1 year ago • 16 comments

I've been trying to install mayavi on a fresh WSL2 instance for a while now, trying different versions of Ubuntu, Python, numpy, vtk, and installation methods, and had no success so far, and almost always get the same error when building wheel for mayavi. The weirdest thing is that a while back I managed to install it just fine in a WSL2 Ubuntu 22.04 instance, and copying the Python version, and pip installed package versions does not work on a fresh instance (I might have installed C libraries that I lost track of in that first instance).

For specificity, I will copy here the latest versions that I tried the installation process with (which try to replicate the setup in which it works), and the error obtained.

Distribution: Ubuntu 22.04.5 LTS (Jammy) Python: 3.10.12 numpy 1.26.4 PyQt5 5.15.11 vtk 9.4.0 (also tried with 9.3.1)

Another thing that might be relevant is that I'm using a venv and pip to install everything

Output of python -m pip install mayavi:

` Collecting mayavi Using cached mayavi-4.8.2.tar.gz (7.1 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: packaging in ./venv3/lib/python3.10/site-packages (from mayavi) (24.2) Collecting envisage Using cached envisage-7.0.3-py3-none-any.whl (268 kB) Collecting apptools Using cached apptools-5.3.0-py3-none-any.whl (230 kB) Collecting traits>=6.0.0 Using cached traits-6.4.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.1 MB) Requirement already satisfied: vtk in ./venv3/lib/python3.10/site-packages (from mayavi) (9.3.1) Collecting pygments Using cached pygments-2.18.0-py3-none-any.whl (1.2 MB) Collecting traitsui>=7.0.0 Using cached traitsui-8.0.0-py3-none-any.whl (1.5 MB) Collecting pyface>=6.1.1 Using cached pyface-8.0.0-py3-none-any.whl (1.3 MB) Requirement already satisfied: numpy in ./venv3/lib/python3.10/site-packages (from mayavi) (1.26.4) Requirement already satisfied: setuptools in ./venv3/lib/python3.10/site-packages (from envisage->mayavi) (59.6.0) Requirement already satisfied: matplotlib>=2.0.0 in ./venv3/lib/python3.10/site-packages (from vtk->mayavi) (3.9.3) Requirement already satisfied: cycler>=0.10 in ./venv3/lib/python3.10/site-packages (from matplotlib>=2.0.0->vtk->mayavi) (0.12.1) Requirement already satisfied: fonttools>=4.22.0 in ./venv3/lib/python3.10/site-packages (from matplotlib>=2.0.0->vtk->mayavi) (4.55.1) Requirement already satisfied: kiwisolver>=1.3.1 in ./venv3/lib/python3.10/site-packages (from matplotlib>=2.0.0->vtk->mayavi) (1.4.7) Requirement already satisfied: contourpy>=1.0.1 in ./venv3/lib/python3.10/site-packages (from matplotlib>=2.0.0->vtk->mayavi) (1.3.1) Requirement already satisfied: pyparsing>=2.3.1 in ./venv3/lib/python3.10/site-packages (from matplotlib>=2.0.0->vtk->mayavi) (3.2.0) Requirement already satisfied: python-dateutil>=2.7 in ./venv3/lib/python3.10/site-packages (from matplotlib>=2.0.0->vtk->mayavi) (2.9.0.post0) Requirement already satisfied: pillow>=8 in ./venv3/lib/python3.10/site-packages (from matplotlib>=2.0.0->vtk->mayavi) (11.0.0) Requirement already satisfied: six>=1.5 in ./venv3/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib>=2.0.0->vtk->mayavi) (1.16.0) Building wheels for collected packages: mayavi 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 ╰─> [43 lines of output] running bdist_wheel running build running build_py Building tvtk_classes.zip ---------------------------------------------------------------------- Building TVTK classes... Fatal Python error: Segmentation fault

  Current thread 0x00007f7a5c375000 (most recent call first):
    File "/tmp/pip-install-xzt3ndlz/mayavi_6a5d15597cdb43c5a859897c017e3955/tvtk/vtk_parser.py", line 713 in _find_get_set_methods
    File "/tmp/pip-install-xzt3ndlz/mayavi_6a5d15597cdb43c5a859897c017e3955/tvtk/vtk_parser.py", line 491 in _organize_methods
    File "/tmp/pip-install-xzt3ndlz/mayavi_6a5d15597cdb43c5a859897c017e3955/tvtk/vtk_parser.py", line 157 in parse
    File "/tmp/pip-install-xzt3ndlz/mayavi_6a5d15597cdb43c5a859897c017e3955/tvtk/wrapper_gen.py", line 337 in _gen_methods
    File "/tmp/pip-install-xzt3ndlz/mayavi_6a5d15597cdb43c5a859897c017e3955/tvtk/wrapper_gen.py", line 238 in generate_code
    File "/tmp/pip-install-xzt3ndlz/mayavi_6a5d15597cdb43c5a859897c017e3955/tvtk/code_gen.py", line 235 in _write_wrapper_class
    File "/tmp/pip-install-xzt3ndlz/mayavi_6a5d15597cdb43c5a859897c017e3955/tvtk/code_gen.py", line 142 in generate_code
    File "/tmp/pip-install-xzt3ndlz/mayavi_6a5d15597cdb43c5a859897c017e3955/tvtk/_setup.py", line 58 in gen_tvtk_classes_zip
    File "<string>", line 247 in build_tvtk_classes_zip
    File "<string>", line 254 in run
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973 in run_command
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 995 in run_command
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316 in run_command
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 135 in run
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973 in run_command
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 995 in run_command
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316 in run_command
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/command/bdist_wheel.py", line 381 in run
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973 in run_command
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 995 in run_command
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 954 in run_commands
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 199 in run_commands
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 183 in setup
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 117 in setup
    File "<string>", line 322 in <module>
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 320 in run_setup
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 522 in run_setup
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 407 in _build_with_temp_dir
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 426 in _build
    File "/tmp/pip-build-env-d4zx3xp6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 438 in build_wheel
    File "/home/gdcs22/venv3/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261 in build_wheel
    File "/home/gdcs22/venv3/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345 in main
    File "/home/gdcs22/venv3/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363 in <module>

  Extension modules: numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg.lapack_lite, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, vtkmodules.vtkCommonCore, vtkmodules.vtkWebCore, vtkmodules.vtkCommonMath, vtkmodules.vtkCommonTransforms, vtkmodules.vtkParallelCore, vtkmodules.vtkCommonDataModel, vtkmodules.vtkCommonExecutionModel, vtkmodules.vtkIOCore, vtkmodules.vtkImagingCore, vtkmodules.vtkIOImage, vtkmodules.vtkIOXMLParser, vtkmodules.vtkIOXML, vtkmodules.vtkCommonMisc, vtkmodules.vtkFiltersCore, vtkmodules.vtkRenderingCore, vtkmodules.vtkRenderingContext2D, vtkmodules.vtkRenderingFreeType, vtkmodules.vtkRenderingSceneGraph, vtkmodules.vtkRenderingVtkJS, vtkmodules.vtkIOExport, vtkmodules.vtkWebGLExporter, vtkmodules.vtkInteractionStyle, vtkmodules.vtkFiltersGeneral, vtkmodules.vtkFiltersSources, vtkmodules.vtkInteractionWidgets, vtkmodules.vtkViewsCore, vtkmodules.vtkViewsInfovis, vtkmodules.vtkCommonComputationalGeometry, vtkmodules.vtkCommonSystem, vtkmodules.vtkFiltersCellGrid, vtkmodules.vtkIOCellGrid, vtkmodules.vtkIOLegacy, vtkmodules.vtkDomainsChemistry, vtkmodules.vtkRenderingHyperTreeGrid, vtkmodules.vtkRenderingUI, vtkmodules.vtkRenderingOpenGL2, vtkmodules.vtkRenderingContextOpenGL2, vtkmodules.vtkRenderingVolume, vtkmodules.vtkImagingMath, vtkmodules.vtkRenderingVolumeOpenGL2, vtkmodules.vtkViewsContext2D, vtkmodules.vtkImagingColor, vtkmodules.vtkTestingRendering, vtkmodules.vtkSerializationManager, vtkmodules.vtkRenderingVolumeAMR, vtkmodules.vtkPythonContext2D, vtkmodules.vtkRenderingParallel, vtkmodules.vtkRenderingVRModels, vtkmodules.vtkRenderingVR, vtkmodules.vtkRenderingMatplotlib, vtkmodules.vtkRenderingLabel, vtkmodules.vtkRenderingLOD, vtkmodules.vtkRenderingLICOpenGL2, vtkmodules.vtkRenderingImage, vtkmodules.vtkRenderingExternal, vtkmodules.vtkRenderingCellGrid, vtkmodules.vtkIOXdmf2, vtkmodules.vtkIOVeraOut, vtkmodules.vtkIOVPIC, vtkmodules.vtkIOTecplotTable, vtkmodules.vtkIOTRUCHAS, vtkmodules.vtkIOSegY, vtkmodules.vtkIOParallelXML, vtkmodules.vtkIOLSDyna, vtkmodules.vtkIOParallelLSDyna, vtkmodules.vtkIOExodus, vtkmodules.vtkIOParallelExodus, vtkmodules.vtkIOPLY, vtkmodules.vtkIOPIO, vtkmodules.vtkIOMovie, vtkmodules.vtkIOOggTheora, vtkmodules.vtkIOOMF, vtkmodules.vtkIONetCDF, vtkmodules.vtkIOMotionFX, vtkmodules.vtkIOGeometry, vtkmodules.vtkIOParallel, vtkmodules.vtkIOMINC, vtkmodules.vtkIOImport, vtkmodules.vtkIOIOSS, vtkmodules.vtkIOHDF, vtkmodules.vtkIOH5part, vtkmodules.vtkIOH5Rage, vtkmodules.vtkIOGeoJSON, vtkmodules.vtkIOFLUENTCFF, vtkmodules.vtkIOVideo, vtkmodules.vtkIOFDS, vtkmodules.vtkIOInfovis, vtkmodules.vtkIOExportPDF, vtkmodules.vtkRenderingGL2PSOpenGL2, vtkmodules.vtkIOExportGL2PS, vtkmodules.vtkIOEngys, vtkmodules.vtkIOEnSight, vtkmodules.vtkIOERF, vtkmodules.vtkIOCityGML, vtkmodules.vtkIOChemistry, vtkmodules.vtkIOCesium3DTiles, vtkmodules.vtkIOCONVERGECFD, vtkmodules.vtkIOCGNSReader, vtkmodules.vtkIOAsynchronous, vtkmodules.vtkIOAMR, vtkmodules.vtkInteractionImage, vtkmodules.vtkInfovisLayout, vtkmodules.vtkImagingStencil, vtkmodules.vtkImagingStatistics, vtkmodules.vtkImagingGeneral, vtkmodules.vtkImagingOpenGL2, vtkmodules.vtkImagingMorphological, vtkmodules.vtkImagingFourier, vtkmodules.vtkIOSQL, vtkmodules.vtkRenderingAnnotation, vtkmodules.vtkImagingHybrid, vtkmodules.vtkGeovisCore, vtkmodules.vtkFiltersTopology, vtkmodules.vtkFiltersTensor, vtkmodules.vtkFiltersSelection, vtkmodules.vtkFiltersSMP, vtkmodules.vtkFiltersPython, vtkmodules.vtkFiltersProgrammable, vtkmodules.vtkFiltersModeling, vtkmodules.vtkFiltersPoints, vtkmodules.vtkFiltersStatistics, vtkmodules.vtkFiltersParallelStatistics, vtkmodules.vtkFiltersImaging, vtkmodules.vtkFiltersExtraction, vtkmodules.vtkFiltersGeometry, vtkmodules.vtkFiltersHybrid, vtkmodules.vtkFiltersHyperTree, vtkmodules.vtkFiltersTexture, vtkmodules.vtkFiltersParallel, vtkmodules.vtkFiltersParallelImaging, vtkmodules.vtkFiltersParallelDIY2, vtkmodules.vtkFiltersTemporal, vtkmodules.vtkFiltersGeometryPreview, vtkmodules.vtkFiltersGeneric, vtkmodules.vtkFiltersFlowPaths, vtkmodules.vtkFiltersAMR, vtkmodules.vtkDomainsChemistryOpenGL2, vtkmodules.vtkCommonPython, vtkmodules.vtkChartsCore, vtkmodules.vtkCommonColor, vtkmodules.vtkImagingSources, vtkmodules.vtkInfovisCore, vtkmodules.vtkAcceleratorsVTKmCore, vtkmodules.vtkAcceleratorsVTKmDataModel, vtkmodules.vtkAcceleratorsVTKmFilters, vtkmodules.vtkFiltersVerdict, vtkmodules.vtkFiltersReduction (total: 161)
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for mayavi Failed to build mayavi ERROR: Could not build wheels for mayavi, which is required to install pyproject.toml-based projects `

If anyone could help me out find a solution even if it means changing distro, python or any installed package versions that would be great. I've been heavily relying on Mayavi to prototype solutions at work, and might just have to resort to another package if I cannot figure this out ):

gdcs92 avatar Dec 03 '24 13:12 gdcs92

Same here but on native(not wsl2) Ubuntu 22.04.03 LTS

` ollecting mayavi==4.8.2 (from -r /tmp/tmpnrtega50 (line 1)) Using cached https://nexus.abagy.com/repository/pip-mirror/packages/mayavi/4.8.2/mayavi-4.8.2.tar.gz (7.1 MB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: mayavi Building wheel for mayavi (pyproject.toml): started Building wheel for mayavi (pyproject.toml): finished with status 'error' Failed to build mayavi ( error: subprocess-exited-with-error

× Building wheel for mayavi (pyproject.toml) did not run successfully. │ exit code: -11 ╰─> [43 lines of output] running bdist_wheel running build running build_py Building tvtk_classes.zip ---------------------------------------------------------------------- Building TVTK classes... Fatal Python error: Segmentation fault

  Current thread 0x00007f96a5a17000 (most recent call first):
    File "/tmp/pip-wheel-86qrhjdx/mayavi_413c202a33c14ed28a6bfdda5e0a2668/tvtk/vtk_parser.py", line 713 in _find_get_set_methods
    File "/tmp/pip-wheel-86qrhjdx/mayavi_413c202a33c14ed28a6bfdda5e0a2668/tvtk/vtk_parser.py", line 491 in _organize_methods
    File "/tmp/pip-wheel-86qrhjdx/mayavi_413c202a33c14ed28a6bfdda5e0a2668/tvtk/vtk_parser.py", line 157 in parse
    File "/tmp/pip-wheel-86qrhjdx/mayavi_413c202a33c14ed28a6bfdda5e0a2668/tvtk/wrapper_gen.py", line 337 in _gen_methods
    File "/tmp/pip-wheel-86qrhjdx/mayavi_413c202a33c14ed28a6bfdda5e0a2668/tvtk/wrapper_gen.py", line 238 in generate_code
    File "/tmp/pip-wheel-86qrhjdx/mayavi_413c202a33c14ed28a6bfdda5e0a2668/tvtk/code_gen.py", line 235 in _write_wrapper_class
    File "/tmp/pip-wheel-86qrhjdx/mayavi_413c202a33c14ed28a6bfdda5e0a2668/tvtk/code_gen.py", line 142 in generate_code
    File "/tmp/pip-wheel-86qrhjdx/mayavi_413c202a33c14ed28a6bfdda5e0a2668/tvtk/_setup.py", line 58 in gen_tvtk_classes_zip
    File "<string>", line 247 in build_tvtk_classes_zip
    File "<string>", line 254 in run
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 973 in run_command
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/dist.py", line 995 in run_command
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/cmd.py", line 316 in run_command
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/command/build.py", line 135 in run
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 973 in run_command
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/dist.py", line 995 in run_command
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/cmd.py", line 316 in run_command
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/command/bdist_wheel.py", line 381 in run
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 973 in run_command
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/dist.py", line 995 in run_command
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 954 in run_commands
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/core.py", line 199 in run_commands
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/_distutils/core.py", line 183 in setup
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/__init__.py", line 117 in setup
    File "<string>", line 322 in <module>
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 320 in run_setup
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 522 in run_setup
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 407 in _build_with_temp_dir
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 426 in _build
    File "/tmp/pip-build-env-bv21117o/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 438 in build_wheel
    File "/bazel/cache/rwc/25a3c77a065e294bcbb59ec17782c259/external/pypi__pip/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251 in build_wheel
    File "/bazel/cache/rwc/25a3c77a065e294bcbb59ec17782c259/external/pypi__pip/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335 in main
    File "/bazel/cache/rwc/25a3c77a065e294bcbb59ec17782c259/external/pypi__pip/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353 in <module>
  
  Extension modules: numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg.lapack_lite, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, vtkmodules.vtkCommonCore, vtkmodules.vtkWebCore, vtkmodules.vtkCommonMath, vtkmodules.vtkCommonTransforms, vtkmodules.vtkParallelCore, vtkmodules.vtkCommonDataModel, vtkmodules.vtkCommonExecutionModel, vtkmodules.vtkIOCore, vtkmodules.vtkImagingCore, vtkmodules.vtkIOImage, vtkmodules.vtkIOXMLParser, vtkmodules.vtkIOXML, vtkmodules.vtkCommonMisc, vtkmodules.vtkFiltersCore, vtkmodules.vtkRenderingCore, vtkmodules.vtkRenderingContext2D, vtkmodules.vtkRenderingFreeType, vtkmodules.vtkRenderingSceneGraph, vtkmodules.vtkRenderingVtkJS, vtkmodules.vtkIOExport, vtkmodules.vtkWebGLExporter, vtkmodules.vtkInteractionStyle, vtkmodules.vtkFiltersGeneral, vtkmodules.vtkFiltersSources, vtkmodules.vtkInteractionWidgets, vtkmodules.vtkViewsCore, vtkmodules.vtkViewsInfovis, vtkmodules.vtkCommonComputationalGeometry, vtkmodules.vtkCommonSystem, vtkmodules.vtkFiltersCellGrid, vtkmodules.vtkIOCellGrid, vtkmodules.vtkIOLegacy, vtkmodules.vtkDomainsChemistry, vtkmodules.vtkRenderingHyperTreeGrid, vtkmodules.vtkRenderingUI, vtkmodules.vtkRenderingOpenGL2, vtkmodules.vtkRenderingContextOpenGL2, vtkmodules.vtkRenderingVolume, vtkmodules.vtkImagingMath, vtkmodules.vtkRenderingVolumeOpenGL2, vtkmodules.vtkViewsContext2D, vtkmodules.vtkImagingColor, vtkmodules.vtkTestingRendering, vtkmodules.vtkSerializationManager, vtkmodules.vtkRenderingVolumeAMR, vtkmodules.vtkPythonContext2D, vtkmodules.vtkRenderingParallel, vtkmodules.vtkRenderingVRModels, vtkmodules.vtkRenderingVR, vtkmodules.vtkRenderingMatplotlib, vtkmodules.vtkRenderingLabel, vtkmodules.vtkRenderingLOD, vtkmodules.vtkRenderingLICOpenGL2, vtkmodules.vtkRenderingImage, vtkmodules.vtkRenderingExternal, vtkmodules.vtkRenderingCellGrid, vtkmodules.vtkIOXdmf2, vtkmodules.vtkIOVeraOut, vtkmodules.vtkIOVPIC, vtkmodules.vtkIOTecplotTable, vtkmodules.vtkIOTRUCHAS, vtkmodules.vtkIOSegY, vtkmodules.vtkIOParallelXML, vtkmodules.vtkIOLSDyna, vtkmodules.vtkIOParallelLSDyna, vtkmodules.vtkIOExodus, vtkmodules.vtkIOParallelExodus, vtkmodules.vtkIOPLY, vtkmodules.vtkIOPIO, vtkmodules.vtkIOMovie, vtkmodules.vtkIOOggTheora, vtkmodules.vtkIOOMF, vtkmodules.vtkIONetCDF, vtkmodules.vtkIOMotionFX, vtkmodules.vtkIOGeometry, vtkmodules.vtkIOParallel, vtkmodules.vtkIOMINC, vtkmodules.vtkIOImport, vtkmodules.vtkIOIOSS, vtkmodules.vtkIOHDF, vtkmodules.vtkIOH5part, vtkmodules.vtkIOH5Rage, vtkmodules.vtkIOGeoJSON, vtkmodules.vtkIOFLUENTCFF, vtkmodules.vtkIOVideo, vtkmodules.vtkIOFDS, vtkmodules.vtkIOInfovis, vtkmodules.vtkIOExportPDF, vtkmodules.vtkRenderingGL2PSOpenGL2, vtkmodules.vtkIOExportGL2PS, vtkmodules.vtkIOEngys, vtkmodules.vtkIOEnSight, vtkmodules.vtkIOERF, vtkmodules.vtkIOCityGML, vtkmodules.vtkIOChemistry, vtkmodules.vtkIOCesium3DTiles, vtkmodules.vtkIOCONVERGECFD, vtkmodules.vtkIOCGNSReader, vtkmodules.vtkIOAsynchronous, vtkmodules.vtkIOAMR, vtkmodules.vtkInteractionImage, vtkmodules.vtkInfovisLayout, vtkmodules.vtkImagingStencil, vtkmodules.vtkImagingStatistics, vtkmodules.vtkImagingGeneral, vtkmodules.vtkImagingOpenGL2, vtkmodules.vtkImagingMorphological, vtkmodules.vtkImagingFourier, vtkmodules.vtkIOSQL, vtkmodules.vtkRenderingAnnotation, vtkmodules.vtkImagingHybrid, vtkmodules.vtkGeovisCore, vtkmodules.vtkFiltersTopology, vtkmodules.vtkFiltersTensor, vtkmodules.vtkFiltersSelection, vtkmodules.vtkFiltersSMP, vtkmodules.vtkFiltersPython, vtkmodules.vtkFiltersProgrammable, vtkmodules.vtkFiltersModeling, vtkmodules.vtkFiltersPoints, vtkmodules.vtkFiltersStatistics, vtkmodules.vtkFiltersParallelStatistics, vtkmodules.vtkFiltersImaging, vtkmodules.vtkFiltersExtraction, vtkmodules.vtkFiltersGeometry, vtkmodules.vtkFiltersHybrid, vtkmodules.vtkFiltersHyperTree, vtkmodules.vtkFiltersTexture, vtkmodules.vtkFiltersParallel, vtkmodules.vtkFiltersParallelImaging, vtkmodules.vtkFiltersParallelDIY2, vtkmodules.vtkFiltersTemporal, vtkmodules.vtkFiltersGeometryPreview, vtkmodules.vtkFiltersGeneric, vtkmodules.vtkFiltersFlowPaths, vtkmodules.vtkFiltersAMR, vtkmodules.vtkDomainsChemistryOpenGL2, vtkmodules.vtkCommonPython, vtkmodules.vtkChartsCore, vtkmodules.vtkCommonColor, vtkmodules.vtkImagingSources, vtkmodules.vtkInfovisCore, vtkmodules.vtkAcceleratorsVTKmCore, vtkmodules.vtkAcceleratorsVTKmDataModel, vtkmodules.vtkAcceleratorsVTKmFilters, vtkmodules.vtkFiltersVerdict, vtkmodules.vtkFiltersReduction (total: 161)
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for mayavi ERROR: Failed to build one or more wheels Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/bazel/cache/rwc/25a3c77a065e294bcbb59ec17782c259/external/rules_python/python/pip_install/tools/wheel_installer/wheel_installer.py", line 200, in main() File "/bazel/cache/rwc/25a3c77a065e294bcbb59ec17782c259/external/rules_python/python/pip_install/tools/wheel_installer/wheel_installer.py", line 180, in main subprocess.run(pip_args, check=True, env=env) File "/usr/lib/python3.10/subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', '--isolated', 'wheel', '--no-deps', '-r', '/tmp/tmpnrtega50']' returned non-zero exit status 1. ) error code: '1' `

dvv47 avatar Dec 06 '24 14:12 dvv47

Same problem here on macOS sequoia 15.0.1 with python 3.10.16

fabiot21 avatar Dec 10 '24 14:12 fabiot21

Possible duplicate of https://github.com/enthought/mayavi/issues/1324

harrandt avatar Dec 11 '24 13:12 harrandt

Downgrading numpy and vtk works for me, first

pip install numpy==1.26.1 vtk==9.3.0

then

pip install mayavi --no-cache-dir --verbose  --no-build-isolation

liyz15 avatar Dec 12 '24 02:12 liyz15

Downgrading numpy and vtk works for me, first

pip install numpy==1.26.1 vtk==9.3.0

then

pip install mayavi --no-cache-dir --verbose  --no-build-isolation

For me this seems to work if wheel is installed (running e.g. pip install wheel==0.45.1 before your commands).

Without wheel installed pip seems to try other mayavi versions as well, they all fail. You might need several verbose to see this

pip install mayavi --no-cache-dir --verbose --verbose --verbose --no-build-isolation

If wheel is not installed the installation of 4.8.2 using the command above fails with

error: invalid command 'bdist_wheel'
Preparing wheel metadata ... error

harrandt avatar Dec 12 '24 07:12 harrandt

Downgrading numpy and vtk works for me, first首先降级 numpy 和 vtk 对我有用

pip install numpy==1.26.1 vtk==9.3.0

then 然后

pip install mayavi --no-cache-dir --verbose  --no-build-isolation

For me this seems to work if wheel is installed (running e.g. pip install wheel==0.45.1 before your commands).对我来说,如果安装了 wheel (例如在命令之前运行 pip install wheel==0.45.1 ),这似乎有效。

Without wheel installed pip seems to try other mayavi versions as well, they all fail.如果没有安装wheel,pip似乎也尝试了其他mayavi版本,但它们都失败了。 You might need several verbose to see this您可能需要一些详细信息才能看到这一点

pip install mayavi --no-cache-dir --verbose --verbose --verbose --no-build-isolation

The installation of 4.8.2 fails with4.8.2 安装失败

error: invalid command 'bdist_wheel'
Preparing wheel metadata ... error

not working for me😭

katie312 avatar Dec 18 '24 08:12 katie312

Wanted to add my voice as well to say that the workaround likewise didn't work for me. Even when pip installing wheel beforehand.

GrowlingM1ke avatar Dec 18 '24 13:12 GrowlingM1ke

Can I assume that you used a clean environment or uninstalled vtk and numpy beforehand?

harrandt avatar Dec 18 '24 15:12 harrandt

I have a local version that I have not touched that works but my issue arises when new builds run on readthedocs. I specified the numpy and vtk versions in requirements.txt and I likewise specify a wheel version under build-system in pyproject.toml. No dice unfortunately 😞

GrowlingM1ke avatar Dec 18 '24 15:12 GrowlingM1ke

@GrowlingM1ke Did you pip list the environment after the installation? Which versions of vtk, numpy and wheel were actually installed? The ones you were expecting?

harrandt avatar Dec 19 '24 06:12 harrandt

@harrandt I have figured it out, it looks like readthedocs does install the correct versions of the packages.

Collecting vtk==9.3.0 (from -r requirements/requirements_basic.txt (line 8))
  Downloading vtk-9.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.2 kB)
Collecting numpy==1.26.1 (from -r requirements/requirements_basic.txt (line 9))
  Downloading numpy-1.26.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)

But it seems to be using the wrong version wheel

created virtual environment CPython3.10.15.final.0-64 in 667ms
  creator CPython3Posix(dest=/home/docs/checkouts/readthedocs.org/user_builds/calcium-transient-analysis/envs/latest, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/docs/.local/share/virtualenv)
    added seed packages: pip==23.1, setuptools==67.6.1, wheel==0.40.0

I've tested out locally with the correct version of wheel 0.45.1 and it worked for me so I think that is the culprit, however for the life of me I am unable to get readthedocs to use the correct wheel version. Specifying build-system in pyproject.toml seems to do nothing.

GrowlingM1ke avatar Dec 19 '24 19:12 GrowlingM1ke

I tried to install it again later, and it's actually OK. That's what I did: rebuilt a new conda environment first, and then pip install wheel==0.45.1 then pip install numpy==1.26.1 vtk==9.3.0 finally pip install mayavi

It indeed works, thanks to harrandt!

katie312 avatar Dec 20 '24 06:12 katie312

Could you please try with the latest version which I will release this weekend on PyPI?

pip install https://github.com/enthought/mayavi/zipball/master

prabhuramachandran avatar Dec 27 '24 10:12 prabhuramachandran

I tried to install it again later, and it's actually OK. That's what I did:我稍后尝试再次安装它,实际上没问题。我就是这样做的: rebuilt a new conda environment first, and then首先重建新的 Conda 环境,然后 pip install wheel==0.45.1``pip 安装 wheel==0.45.1 then  然后 pip install numpy==1.26.1 vtk==9.3.0 finally  最后 pip install mayavi

It indeed works, thanks to harrandt!多亏了 harrandt,它确实有效!

I did as you, but I get the following: Traceback (most recent call last): File "E:\miniconda\lib\site-packages\traits\trait_notifiers.py", line 342, in call self.handler(*args) File "E:\miniconda\lib\site-packages\mayavi\components\contour.py", line 204, in _contours_changed cf.update() File "tvtk_classes\algorithm.py", line 1076, in update ret = self._wrap_call(self._vtk_obj.update, *args) AttributeError: 'vtkmodules.vtkFiltersCore.vtkContourFilter' object has no attribute 'update' I don't know why.

OCEANOUXIN avatar Jan 05 '25 08:01 OCEANOUXIN

@OCEANOUXIN Was the correct environment active and did you try pip list in your environment to see if the desired packages are installed?

harrandt avatar Jan 07 '25 07:01 harrandt

Could you please try with the latest version which I will release this weekend on PyPI?

pip install https://github.com/enthought/mayavi/zipball/master

Yes, this works for me, without any downgrade of VTK and numpy, thanks!

fbonaldi avatar Jan 11 '25 08:01 fbonaldi

I think this is working on latest master so I'll close

larsoner avatar May 06 '25 15:05 larsoner