Skip to content

Installation

Installation is as simple as:

pip install pydantic

Pydantic has a few dependencies:

If you've got Python 3.8+ and pip installed, you're good to go.

Pydantic is also available on conda under the conda-forge channel:

conda install pydantic -c conda-forge

Optional dependencies

Pydantic has the following optional dependencies:

  • email: Email validation provided by the email-validator package.
  • timezone: Fallback IANA time zone database provided by the tzdata package.

To install optional dependencies along with Pydantic:

# with the `email` extra:
pip install pydantic[email]
# or with `email` and `timezone` extras:
pip install pydantic[email,timezone]

Of course, you can also install requirements manually with pip install email-validator tzdata.

Install from repository

And if you prefer to install Pydantic directly from the repository:

pip install git+https://github.com/pydantic/pydantic@main#egg=pydantic
# or with `email` and `timezone` extras:
pip install git+https://github.com/pydantic/pydantic@main#egg=pydantic[email,timezone]