Skip to content

INSTALL: older version of petsc will cause error for building petsc4py #4242

@scaomath

Description

@scaomath

Describe the error
I recently updated to a fresh install of Ubuntu 24.04, and installed petsc last month. Upon installing Firedrake today, I tried first using the environment variable pointing to the installed petsc (version 3.22.2). However, Firedrake installing script will give the following error:
Failed to build petsc4py ERROR: Could not build wheels for petsc4py, which is required to install pyproject.toml-based projects
Upon re-installing the correct version of petsc 4.23 according to pyproject.toml, everything is good. Note this is not necessarily a bug for Firedrake installing script. This issue is more like a feature request.

Steps to Reproduce

  1. Install petsc with a version, say 3.22.2.
  2. Install Firedrake by cloning the latest Github repo, with requirements pointing to a different version of petsc4py.
  3. Building wheel will fail for petsc4py.

Expected behavior
I suggest adding some version check on petsc against the Python bindings petsc4py slepc4py used in pyproject.toml.

Environment:

  • OS: Ubuntu 24.04
  • Python version: I tried 3.11.12 first, then 3.10.17, the error persits so I figured it might be something else.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions