ImportError: cannot import name 'Annotated' from 'pydantic.typing' when using inflect library in Python -- 2

Job ID: 36978316

Budget: $30 – $250 USD

Hello I am using Python 3.8 And I am trying to create a function to sort and print a list in the form of,
{first_element}, {second_element} and {last_element}
I've used the inflect library in Python to do this because it is expected to be used in my assignment.
import inflect
p = inflect.engine()

def sort():
fruits = ["apple", "banana", "carrot"]
mylist = p.join(fruits)
print(mylist)

sort()
But when I execute this I get the following error:
I tried reinstalling the library called Pydantic. But it didn't change anything.
I wish anyone to help me