Hello,
I’m posting here because I’m having an issue with the petsc4py
module. I’m trying to solve the heat equation, and to create the variational form, I need to use dolfinx.fem.petsc.LinearProblem
. However, the petsc
module is not found and does not exist on Anaconda (Windows).
How can I install it? Or is there another way to solve this problem using different modules?
Thank you for your response.
from dolfinx.fem.petsc import LinearProblem
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[11], line 1
----> 1 from dolfinx.fem.petsc import LinearProblem
File ~\anaconda3\envs\fenicsx-env\Lib\site-packages\dolfinx\fem\petsc.py:20
17 import functools
18 import typing
---> 20 from petsc4py import PETSc
22 # ruff: noqa: E402
23 import dolfinx
ModuleNotFoundError: No module named 'petsc4py'