After activating my venv and installing Pydantic through
pip install pydantic
I tried creating a new file as follows:
from pydantic import Basemodel, EmailStr
class Person(BaseModel):
id: int
name: str
email: EmailStr
and was just running this file with the unused class. But it returned the following error:
ModuleNotFoundError: No module named 'email_validator'
.
.
.
ImportError: email-validator is not installed, run `pip install pydantic[email]`
When running the hint
pip install pydantic[email]
it tells me:
zsh: no matches found: pydantic[email]
Could someone help me with this stupid beginner error? Thanks!
I reinstalled Pydantic, recreated a venv, reactivated the venv.