ImportError: cannot import name 'TypeGuard' from 'typing_extensions' (/home/appuser/venv/lib/python3.9/site-packages/typing_extensions.py)

Hi there,

I did try to deploy on Streamlit Cloud and shown these msg "ImportError: cannot import name ‘TypeGuard’ from ‘typing_extensions’ "

I did add into the requeriments.txt file because I did think the this library was not installed, however; the msg still.
Does somebody could help me ?

Thank you

----- error msg starts here -----

[02:28:42] :package: Processed dependencies!

Traceback (most recent call last):

File “/home/appuser/venv/bin/streamlit”, line 5, in

from streamlit.web.cli import main

File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/init.py”, line 70, in

from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator

File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/delta_generator.py”, line 36, in

from streamlit import cursor

File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/cursor.py”, line 18, in

from streamlit.runtime.scriptrunner import get_script_run_ctx

File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/init.py”, line 16, in

from .script_runner import (

File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 34, in

from streamlit.runtime.state import (

File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/state/init.py”, line 16, in

from .safe_session_state import SafeSessionState as SafeSessionState

File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/state/safe_session_state.py”, line 21, in

from .session_state import (

File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/state/session_state.py”, line 44, in

from streamlit.type_util import ValueFieldName

File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/type_util.py”, line 35, in

from typing_extensions import (

ImportError: cannot import name ‘TypeGuard’ from ‘typing_extensions’ (/home/appuser/venv/lib/python3.9/site-packages/typing_extensions.py)

Hi @cbay :wave:

Could you please share a link to your repo?

Hi snehankekre,

Is there a way where I could share my repo in a privacy mode ?

thank you