Why aren't transformers imported in Python?

Viewed 2073

I want to import transformers in jupyter notebook but I get the following error. What is the reason for this error? My Python version is 3.8

ImportError: cannot import name 'TypeAlias' from 'typing_extensions'

I also updated the typing-extensions library version, but the problem was not resolved

3 Answers

You could try

pip install typing-extensions --upgrade

maybe the probelm is the version of datasets package: pip install datasets==1.15

TypeAlias is available from python version 3.10. You should upgrade your python version to avoid the error.

Related