Getting an import error after successfully gradio in some notebooks only but not in some ( especially new ones). Google Colab

!pip install  gradio
14 from pydantic_core import CoreSchema, core_schema
     15 from pydantic_core import validate_core_schema as _validate_core_schema
---> 16 from typing_extensions import TypeAliasType, TypeGuard, get_args, get_origin
     17 
     18 from . import _repr

ImportError: cannot import name 'TypeAliasType' from 'typing_extensions' (/usr/local/lib/python3.10/dist-packages/typing_extensions.py)

typing_extensions is installed and its version is 4.9.0
gradio is successfully imported when i make a new notebook with same version of typing_extensions but it won’t import in the notebook i want it to. It was not importing locally but it seems to be working locally. But it won’t work on Colab and Kaggle Notebooks. I wondering what is the problem

Leave a Comment