Error while test with tutorials

Hi,

I was trying to run FEniCS with the tutorial examples. However I always meet the error as follow, it always happens at the Expression line, anyone met this problem before? :

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/dolfin/jit/jit.py”, line 167, in compile_class
mpi_comm=mpi_comm)
File “/usr/lib/python3/dist-packages/dolfin/jit/jit.py”, line 47, in mpi_jit
return local_jit(*args, **kwargs)
File “/usr/lib/python3/dist-packages/dolfin/jit/jit.py”, line 103, in dijitso_jit
return dijitso.jit(*args, **kwargs)
File “/home/dongwei/.local/lib/python3.5/site-packages/dijitso/jit.py”, line 144, in jit
params = validate_params(params)
File “/home/dongwei/.local/lib/python3.5/site-packages/dijitso/params.py”, line 264, in validate_params
value = as_str_tuple(value)
File “/home/dongwei/.local/lib/python3.5/site-packages/dijitso/params.py”, line 194, in as_str_tuple
raise RuntimeError(“Expecting a string or list of strings, not %s.” % (p,))
RuntimeError: Expecting a string or list of strings, not {’/usr/include/suitesparse’, ‘/usr/include/eigen3’, ‘/usr/lib/slepcdir/3.7.2/x86_64-linux-gnu-real/include’, ‘/usr/include/hdf5/openmpi’, ‘/usr/include/scotch’, ‘/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent’, ‘/usr/lib/openmpi/include/openmpi’, ‘/usr/lib/petscdir/3.7.3/x86_64-linux-gnu-real/include’, ‘/usr/lib/openmpi/include’, ‘/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include’}.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “untitled.py”, line 8, in
u_D = Expression(‘std::1 + x[0]x[0] + 2x[1]*x[1]’, degree=2)
File “/usr/lib/python3/dist-packages/dolfin/function/expression.py”, line 376, in init
self._cpp_object = jit.compile_expression(cpp_code, params)
File “/usr/lib/python3/dist-packages/dolfin/function/jit.py”, line 158, in compile_expression
expression = compile_class(cpp_data, mpi_comm=mpi_comm)
File “/usr/lib/python3/dist-packages/dolfin/jit/jit.py”, line 170, in compile_class
raise RuntimeError(“Unable to compile C++ code with dijitso”)
RuntimeError: Unable to compile C++ code with dijitso

I’m getting the same error, did you manage to find a solution to this?

Could you post a minimum working example that reproduces the error?

https://fenicsproject.discourse.group/t/error-running-demo-code/290/2
Here, johannr gave one solution.