Dear Emmanuel,


It seems that you are trying to use a pre-installed PETSc, but the installer is unable to find some file (`hdf5.h`).

Could you tell us the configuration options you used to install PETSc?
When we make `firedrake-install` do all the installation work, it asks PETSc to install a number of dependencies (including hdf5), so if we want to build PETSc separately, we must configure it with correct options as `firedrake-install` would.
You can see those options by running:

python3 firedrake-install --show-petsc-configure-options

To ensure compatibility with all firedrake components, we also recommend that PETSc be downloaded from the following branch (if you have not done so), which we try to keep up-to-date with the upstream PETSc as frequently as possible:

https://github.com/firedrakeproject/petsc.git

Regards,
Koki



From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Emmanuel Yarleque Medina <eyarmed@gmail.com>
Sent: Friday, August 23, 2019 7:35:22 PM
To: firedrake <firedrake@imperial.ac.uk>
Subject: [firedrake] Error instalation
 
Hi users,

I have the following error installing Firedrake on ubuntu 16.04


(firedrake) hpc@hpc:~/firedrake/src/firedrake$ make alltest
    Building extension modules
Traceback (most recent call last):
  File "setup.py", line 8, in <module>
    import petsc4py
ImportError: No module named 'petsc4py'
    Linting firedrake codebase
    Linting firedrake test suite
    Linting firedrake scripts
    Running all regression tests
============================================ test session starts ============================================
platform linux -- Python 3.5.2, pytest-5.1.1, py-1.8.0, pluggy-0.12.0
rootdir: /home/hpc/firedrake/src/firedrake, inifile: setup.cfg
plugins: forked-1.0.2, xdist-1.29.0
collected 0 items / 1 errors                                                                                

================================================== ERRORS ===================================================
_______________________________________ ERROR collecting test session _______________________________________
../../lib/python3.5/site-packages/_pytest/config/__init__.py:436: in _importconftest
    return self._conftestpath2mod[conftestpath]
E   KeyError: local('/home/hpc/firedrake/src/firedrake/tests/extrusion/conftest.py')

During handling of the above exception, another exception occurred:
../../lib/python3.5/site-packages/_pytest/config/__init__.py:442: in _importconftest
    mod = conftestpath.pyimport()
../../lib/python3.5/site-packages/py/_path/local.py:701: in pyimport
    __import__(modname)
<frozen importlib._bootstrap>:969: in _find_and_load
    ???
<frozen importlib._bootstrap>:958: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:673: in _load_unlocked
    ???
../../lib/python3.5/site-packages/_pytest/assertion/rewrite.py:140: in exec_module
    exec(co, module.__dict__)
tests/extrusion/conftest.py:2: in <module>
    from firedrake import ExtrudedMesh, UnitSquareMesh, UnitIntervalMesh
firedrake/__init__.py:5: in <module>
    if "PETSC_DIR" in os.environ and not config["options"]["honour_petsc_dir"]:
E   TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:
../../lib/python3.5/site-packages/py/_path/common.py:377: in visit
    for x in Visitor(fil, rec, ignore, bf, sort).gen(self):
../../lib/python3.5/site-packages/py/_path/common.py:418: in gen
    dirs = self.optsort([p for p in entries
../../lib/python3.5/site-packages/py/_path/common.py:419: in <listcomp>
    if p.check(dir=1) and (rec is None or rec(p))])
../../lib/python3.5/site-packages/_pytest/main.py:606: in _recurse
    ihook = self.gethookproxy(dirpath)
../../lib/python3.5/site-packages/_pytest/main.py:424: in gethookproxy
    my_conftestmodules = pm._getconftestmodules(fspath)
../../lib/python3.5/site-packages/_pytest/config/__init__.py:420: in _getconftestmodules
    mod = self._importconftest(conftestpath.realpath())
../../lib/python3.5/site-packages/_pytest/config/__init__.py:450: in _importconftest
    raise ConftestImportFailure(conftestpath, sys.exc_info())
E   _pytest.config.ConftestImportFailure: (local('/home/hpc/firedrake/src/firedrake/tests/extrusion/conftest.py'), (<class 'TypeError'>, TypeError("'NoneType' object is not subscriptable",), <traceback object at 0x7f4728146088>))
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================= 1 error in 0.29s ==============================================
Makefile:64: recipe for target 'test' failed
make: *** [test] Error 2