Dolfin in virtual environment (venv)

Hi,
I’ve got some python code which worked for me when I had fenics package installed directly in my system’s (Debian) python distribution…

Recently I tried to install fenics package (2019.1) inside virtual environment (venv, not conda) and I kept getting an error:

E   ModuleNotFoundError: No module named 'dolfin'

when trying to:

from dolfin import *

After some digging I found this thread where they advise pip installing fenics with '–install-option’s to cope with the problem. It is also mentioned there that one of the guys is to prepare some tutorial on the issue.
Despite my best I couldn’t find this tutorial on the net.
Could someone provide a link to this tutorial (if it exists)?
If the tutorial does not exist, could someone write once and for all, what is the right way of installing fenics in venv, please? I believe this kind of information may be useful for people and save them some time.
Or maybe it is that you recommend a docker version of fenics for such purposes and you don’t care about the venv?

1 Like