Cannot import name 'Form' from 'dolfinx'

Hi, I just installed the newest dolfinx following instructions on github for linux (ubuntu) using conda.

conda create -n fenicsx-env
conda activate fenicsx-env
conda install -c conda-forge fenics-dolfinx mpich pyvista

However, when I run the demo code from Cahn-Hilliard equation — DOLFINx documentation

I get the error

$ python ./ 
Traceback (most recent call last):
  File "path/./", line 117, in <module>
    from dolfinx import (Form, Function, FunctionSpace, NewtonSolver,
ImportError: cannot import name 'Form' from 'dolfinx'

Any help would be appreciated. Thanks!


I think you are running a different file instead of the one given from the link you provided.