No module named 'dolfin' Ubuntu 18.04 bionic

the latest update to 2019.2.0.5~ppa1~bionic1 broke my FEniCS installation. Now I can’t import dolfin anymore. Am I the only one experiencing this?

Thanks in advance for any help!

It’s been reported by others. I’m looking into it.

Ubuntu 18.04 bionic had a poor way of managing PETSc alternatives which was later improved. If you’re in a position to upgrade to Ubuntu 20.04 then I recommend doing that.

In the meantime, as a workaround you can get dolfin back by explicitly setting PETSC_DIR,

$ PETSC_DIR=/usr/lib/petscdir/petsc3.7/x86_64-linux-gnu-real/ python3 -c "import dolfin; print(dolfin.__version__); print(dolfin.__path__)"

It’s fixed now in the PPA. The problem was that Ubuntu bionic used an overly complicated path for PETSC_DIR, which interfered with backporting the latest DOLFIN release…

Thanks a lot! This was super fast and super efficient. I can confirm that it’s working for me.

1 Like