Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS 12.5 with Python 3.10 has a broken VTK wheel #2516

Closed
ReubenHill opened this issue Aug 3, 2022 · 4 comments · Fixed by #2358
Closed

MacOS 12.5 with Python 3.10 has a broken VTK wheel #2516

ReubenHill opened this issue Aug 3, 2022 · 4 comments · Fixed by #2358
Assignees

Comments

@ReubenHill
Copy link
Contributor

A successful firedrake installation on MacOS 12.5 with Python 3.10 downloads a VTK wheel that does not work properly. On firedrake import one finds

In [1]: from firedrake import *
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Input In [1], in <cell line: 1>()
----> 1 from firedrake import *

File ~/firedrake/src/firedrake/firedrake/__init__.py:80, in <module>
     78 from firedrake.functionspace import *
     79 from firedrake.interpolation import *
---> 80 from firedrake.output import *
     81 from firedrake.linear_solver import *
     82 from firedrake.preconditioners import *

File ~/firedrake/src/firedrake/firedrake/output.py:13, in <module>
     10 from firedrake.petsc import PETSc
     11 from firedrake.utils import IntType
---> 13 from .paraview_reordering import vtk_lagrange_tet_reorder,\
     14     vtk_lagrange_hex_reorder, vtk_lagrange_interval_reorder,\
     15     vtk_lagrange_triangle_reorder, vtk_lagrange_quad_reorder,\
     16     vtk_lagrange_wedge_reorder
     17 __all__ = ("File", )
     20 VTK_INTERVAL = 3

File ~/firedrake/src/firedrake/firedrake/paraview_reordering.py:5, in <module>
      2 import numpy as np
      3 from pyop2.utils import as_tuple
----> 5 from vtkmodules.vtkCommonDataModel import (
      6     vtkLagrangeTriangle, vtkLagrangeTetra,
      7     vtkLagrangeQuadrilateral, vtkLagrangeHexahedron, vtkLagrangeWedge
      8 )
     10 paraviewUsesVTK8 = True
     13 def firedrake_local_to_cart(element):

ModuleNotFoundError: No module named 'vtkmodules.vtkCommonDataModel'

This can be resolved by running

pip uninstall vtk

which removes the faulty vtk 9.1.0.dev0 wheel then

pip install vtk

which installs vtk 9.2.0rc2.

Note that this is not ideal since the wheel pip finds is not a final release.

@JDBetteridge
Copy link
Member

I think we might be hitting this issue:
https://gitlab.kitware.com/vtk/vtk/-/issues/18543
Can you try downgrading your setuptools?

@tranner
Copy link

tranner commented Aug 31, 2022

I've also seen this problem when trying to build some docker containers based on the ones provided by firedrake. The above solution seems to fix the problem.

setuptools is version 59.2.0

Step 8/19 : RUN bash -c '. /home/firedrake/firedrake/bin/activate && python -c "import setuptools; print(setuptools.__version__)"'
 ---> Running in 4b857e4e5e56
59.2.0

Passing build with this fix: https://gitlab.com/tom-ranner/sfem-tutorial/-/jobs/2958053949
Previous failing build: https://gitlab.com/tom-ranner/sfem-tutorial/-/jobs/2940307192

@ReubenHill
Copy link
Contributor Author

Having run some tests this is still an issue but is resolved by #2509

@JDBetteridge
Copy link
Member

JDBetteridge commented Nov 16, 2022

This will get resolved when we march forward to support Python 3.11 (hopefully before the end of the month!)

@JDBetteridge JDBetteridge self-assigned this Nov 16, 2022
@JDBetteridge JDBetteridge linked a pull request Nov 16, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants