Hi everyone,
I am attempting to install dolfinx following the instructions provided here:https://docs.fenicsproject.org/dolfinx/. However, I cannot use conda (due to company restrictions and the need for a license), and using apt
results in an SSL certificate error (I am using WSL in a Windows computer protected by a cloud security platform (Zscaler)).
When I run from dolfinx import default_real_type, fem, mesh
, I encounter the following error:
File "/home/tcousin/turb_env/lib/python3.12/site-packages/dolfinx/__init__.py", line 32, in <module>
from dolfinx import fem, geometry, graph, io, jit, la, log, mesh, nls, plot, utils
File "/home/tcousin/turb_env/lib/python3.12/site-packages/dolfinx/utils.py", line 115, in <module>
class ctypes_utils:
File "/home/tcousin/turb_env/lib/python3.12/site-packages/dolfinx/utils.py", line 136, in ctypes_utils
_lib_ctypes = _ctypes.cdll.LoadLibrary(str(get_petsc_lib()))
And the error message continues with:
File "/home/tcousin/turb_env/lib/python3.12/site-packages/dolfinx/utils.py", line 44, in get_petsc_lib
raise RuntimeError(
RuntimeError: Could not find a PETSc shared library. Candidate paths: ['/tmp/pip-build-env-7cnfg82c/normal/lib/python3.12/site-packages/petsc/lib/libpetsc.so', '/tmp/pip-build-env-7cnfg82c/normal/lib/python3.12/site-packages/petsc/lib/libpetsc.dylib']
I don’t understand where these candidate paths are coming from. When I run find / -name "libpetsc.so"
, it returns the following path:
/home/tcousin/turb_env/lib/python3.12/site-packages/petsc/lib/libpetsc.so
.
How can I make this path the “candidate” path for PETSc?
Thanks a lot for your time and for this amazing platform.