Error with compiler when running first example code

I’ve just tried to install FEniCS on Ubuntu 16.04 and when I try to run the first example code using python3.5 I get the following 2 errors:

RuntimeError: Expecting a string or list of strings, not {‘slepc_real’, ‘sz’, ‘mpi’, ‘mpi_cxx’, ‘hdf5’, ‘boost_timer’, ‘m’, ‘boost_filesystem’, ‘z’, ‘dolfin’, ‘petsc_real’, ‘dl’}.

RuntimeError: Unable to compile C++ code with dijitso

I installed by building from source, when I used the ppa for ubuntu I got an import error that no module called ‘fenics’ could be found.

Has anyone encountered or solved this problem?