First demo not working

Hello,
I have finished installation process with ubuntu - jupyter notebook.
I tried to run demo_poisson_equation but it didn’t work.

I don’t know if it is because of the installation or it is for this line
V = FunctionSpace(mesh, “Lagrange”, 1)

can someone help me?

Could you be so kind to share the full error message?

Yes, thank you for helping me

demo code:
from dolfin import *
mesh = UnitSquareMesh(32, 32)
V = FunctionSpace(mesh, “Lagrange”, 1)

error:
Calling FFC just-in-time (JIT) compiler, this may take some time.

FileNotFoundError Traceback (most recent call last)
in ()
2 # Create mesh and define function space
3 mesh = UnitSquareMesh(32, 32)
----> 4 V = FunctionSpace(mesh, “Lagrange”, 1)
5 # Define Dirichlet boundary (x = 0 or x = 1)
6 def boundary(x):

~/anaconda3/lib/python3.7/site-packages/dolfin/function/functionspace.py in init(self, *args, **kwargs)
31 self._init_from_ufl(*args, **kwargs)
32 else:
—> 33 self._init_convenience(*args, **kwargs)
34
35 def _init_from_ufl(self, mesh, element, constrained_domain=None):

~/anaconda3/lib/python3.7/site-packages/dolfin/function/functionspace.py in _init_convenience(self, mesh, family, degree, form_degree, constrained_domain, restriction)
98 form_degree=form_degree)
99
–> 100 self._init_from_ufl(mesh, element, constrained_domain=constrained_domain)
101
102 def dolfin_element(self):

~/anaconda3/lib/python3.7/site-packages/dolfin/function/functionspace.py in _init_from_ufl(self, mesh, element, constrained_domain)
41 # Compile dofmap and element
42 ufc_element, ufc_dofmap = ffc_jit(element, form_compiler_parameters=None,
—> 43 mpi_comm=mesh.mpi_comm())
44 ufc_element = cpp.fem.make_ufc_finite_element(ufc_element)
45

~/anaconda3/lib/python3.7/site-packages/dolfin/jit/jit.py in mpi_jit(*args, **kwargs)
45 # Just call JIT compiler when running in serial
46 if MPI.size(mpi_comm) == 1:
—> 47 return local_jit(*args, **kwargs)
48
49 # Default status (0 == ok, 1 == fail)

~/anaconda3/lib/python3.7/site-packages/dolfin/jit/jit.py in ffc_jit(ufl_form, form_compiler_parameters)
95 p.update(dict(parameters[“form_compiler”]))
96 p.update(form_compiler_parameters or {})
—> 97 return ffc.jit(ufl_form, parameters=p)
98
99

~/anaconda3/lib/python3.7/site-packages/ffc/jitcompiler.py in jit(ufl_object, parameters, indirect)
215
216 # Inspect cache and generate+build if necessary
–> 217 module = jit_build(ufl_object, module_name, parameters)
218
219 # Raise exception on failure to build or import module

~/anaconda3/lib/python3.7/site-packages/ffc/jitcompiler.py in jit_build(ufl_object, module_name, parameters)
131 name=module_name,
132 params=params,
–> 133 generate=jit_generate)
134 return module
135

~/anaconda3/lib/python3.7/site-packages/dijitso/jit.py in jit(jitable, name, params, generate, send, receive, wait)
176 status, output, lib_filename, err_info =
177 build_shared_library(signature, header, source, dependencies,
–> 178 params)
179
180 # 4a) Send library over network if we have a send function

~/anaconda3/lib/python3.7/site-packages/dijitso/build.py in build_shared_library(signature, header, source, dependencies, params)
151 # Execute command to compile generated source code to dynamic
152 # library
–> 153 status, output = get_status_output(cmd)
154
155 # Move files to cache on success or a local dir on failure,

~/anaconda3/lib/python3.7/site-packages/dijitso/system.py in _get_status_output_subprocess(cmd, input, cwd, env)
39 cmd = cmd.strip().split()
40 pipe = subprocess.Popen(cmd, shell=False, cwd=cwd, env=env,
—> 41 stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
42 (output, errout) = pipe.communicate(input=input)
43 assert not errout

~/anaconda3/lib/python3.7/subprocess.py in init(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors, text)
773 c2pread, c2pwrite,
774 errread, errwrite,
–> 775 restore_signals, start_new_session)
776 except:
777 # Cleanup if the child failed starting.

~/anaconda3/lib/python3.7/subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session)
1520 if errno_num == errno.ENOENT:
1521 err_msg += ': ’ + repr(err_filename)
-> 1522 raise child_exception_type(errno_num, err_msg, err_filename)
1523 raise child_exception_type(err_msg)
1524

FileNotFoundError: [Errno 2] No such file or directory: ‘c++’: ‘c++’

This Seems like an installation issue. Which instructions did you follow to install FEniCS?

I installed ubuntu in windows 10, then anaconda in ubuntu and with jupyter notebook

code:
!conda config --add channels conda-forge
!conda install fenics -y

As far as I know, the conda build only supports Mac and Linux.

Anaconda
To use our prebuilt Anaconda Python packages (Linux and Mac only), first install Anaconda, then run following commands in your terminal:

Since you are using windows, i would consider using docker or Windows subsystem, as described at https://fenicsproject.org/download/

But anaconda is running in Linux, not in windows.
Can be a version problem?