Tutorial Example

Fix Python SyntaxError: future feature annotations is not defined – Gradio Tutorial

When we are running a python script built with python gradio, we get this error: SyntaxError: future feature annotations is not defined. In this tutorial, we will introduce you how to fix it.

This error is:

How to fix this SyntaxError?

It is easy to fix. We should use higher python version.

From image above we can find: we are using python 3.6, however, Gradio requires Python 3.7 or higher.

In order to fix this error, we should update our python version to 3.7 or higher.

Then, you will find this error is fixed.