I've been using sympy to automate some derivative computation and I loved it. I found the evalf[1] function to be really helpful as it helps bridge the gap between the symbolic and numeric world.
f = 'x**3+x-1'
x = 4
eval(f)
It should work fine.