How to render the figure with mathematical expression(n-th root) using matplotlib 3.3.4?

When I try to render the figure with mathematical expression(exactly n-th root), I got this message:
Expected \sqrt{value}, found ‘[’ (at char 5), (line:1, col:6).
My code is plt.text(0.5, 0.5, '$\sqrt[n]{5}$'). However, if I replace '$\sqrt[n]{5}$' with '$\sqrt[3]{5}$', it can run successfully. why their results are different? Thank you!

You cannot do that in 3.3.4; support for non-integer roots was added in 3.4.0.