How to Install sendgrid in Python

v6.12.5 General Purpose Python !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7 MIT

Twilio SendGrid library for Python

Install pip install sendgrid

What is sendgrid?

Twilio SendGrid library for Python

|Tests Badge| |Python Versions| |PyPI Version| |Docker Badge| |MIT licensed| |Twitter Follow| |GitHub contributors| |Open Source Helpers|

This library allows you to quickly and easily use the Twilio SendGrid Web API v3 via Python.

- Version 6.X release is a BREAKING CHANGE from version 5.X, please see the for details. - Send SMS messages with .

Quick Start

Minimal example to get started with sendgrid:

import sendgrid

print(sendgrid.__version__)

Installation

pip (standard)

pip install sendgrid

Virtual environment (recommended)

python -m venv venv
source venv/bin/activate   # Windows: venv\Scripts\activate
pip install sendgrid

pip3

pip3 install sendgrid

conda

conda install -c conda-forge sendgrid

Poetry

poetry add sendgrid

Dependencies

Installing sendgrid will also install these packages:

Verify the Installation

After installing, confirm the package is available:

python -c "import sendgrid; print(sendgrid.__version__)"

If this prints a version number, installation succeeded. If you see a ModuleNotFoundError, see the errors section below.

Installation Errors

Common errors when installing sendgrid with pip.

ModuleNotFoundError: No module named 'sendgrid'

Cause: The package is not installed in the current Python environment.

Fix: Run pip install sendgrid. If using a virtual environment, ensure it is activated first.

ModuleNotFoundError: No module named 'sendgrid' (installed but still failing)

Cause: pip installed the package into a different Python than the one running your script.

Fix: Use python -m pip install sendgrid to install into the interpreter you are running.

ImportError: cannot import name 'X' from 'sendgrid'

Cause: The function or class does not exist in the installed version.

Fix: Check the version with pip show sendgrid and upgrade with pip install --upgrade sendgrid.

pip: command not found

Cause: pip is not in PATH or Python was not added to PATH during installation.

Fix: Try python -m pip install sendgrid. On macOS/Linux try pip3.

PermissionError: [Errno 13] Permission denied

Cause: No write access to the system Python package directory.

Fix: Use a virtual environment, or add --user: pip install --user sendgrid

SSL: CERTIFICATE_VERIFY_FAILED

Cause: pip cannot verify PyPI's SSL certificate — common behind corporate proxies.

Fix: Try: pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org sendgrid

Recent Releases

VersionReleased
6.12.5 latest 2025-09-19
6.12.4 2025-06-12
6.12.3 2025-05-29
6.12.1 2025-05-13
6.12.2 2025-05-13

Full release history on PyPI →

Manage sendgrid

Upgrade to latest version

pip install --upgrade sendgrid

Install a specific version

pip install sendgrid==6.12.5

Uninstall

pip uninstall sendgrid

Check what is installed

pip show sendgrid

Last updated: 2026-04-11 • Data from PyPI