You have a ast.expr subclass, not a ast.Expression top-level node.
compile() can only take a mod object, so one of Module, Interactive or Expression, depending on the third argument to compile(). For 'eval', use ast.Expression().
You can create one containing the ast.Compare node:
expr = ast.Expression(cond)
because the abstract grammar defines it as:
Expression(expr body)
and this you can compile:
compile(expr, '<file>', 'eval')
Demo:
>>> import ast
>>> code = "if foo == 'bar': pass"
>>> tree = ast.parse(code, '<file>', 'exec')
>>> cond = tree.body[0].test
>>> expr = ast.Expression(cond)
>>> compile(expr, '<file>', 'eval')
<code object <module> at 0x1067f6230, file "<file>", line 1>
>>> foo = 'baz'
>>> eval(compile(expr, '<file>', 'eval'))
False
>>> foo = 'bar'
>>> eval(compile(expr, '<file>', 'eval'))
True