I think executing code makes things too strict, and can lock up/shut people down, since forgetting a library function name means you're completely stuck, which causes a feedback loop of nervous. Interviews are high stress. Absolute precision, required to run code, is not a good fit for high stress, in my opinion. You'll filter people that haven't don't a lot of interviews more than anything.
I keep the problem relatively simple. I tell them that they can use whatever language, don't worry about silly typos, or exact syntax, and if you forget a library name just make one up. It's trivial to see if someone can code without executing the code.
If I notice obvious problems, I'll describe the incorrect behavior, like if there's an infinite loop: "I see a problem. When you run the code, you see that it never ends".