Skip to main content
Version: 0.16.16

Install Great Expectations locally

This guide will help you Install Great Expectations locally for use with Python.

Prerequisites

  • A supported version of Python (3.7 to 3.10). To download and install Python, see Python downloads..
note
Windows Support

Windows support for the open source Python version of GX is currently unavailable. If you’re using GX in a Windows environment, you might experience errors or performance issues.

Steps

1. Check Python version

First, check the version of Python that you have installed. As of this writing, Great Expectations supports versions 3.7 through 3.10 of Python.

You can check your version of Python by running:

Terminal command
python --version

If this command returns something other than a Python 3 version number (like Python 3.X.X), you may need to try this:

Terminal command
python3 --version

2. Choose installation method

Our recommended best practice is to use a virtual environment for your Great Expectations installation. Both standard Python 3 and Anaconda support the creation of virtual environments. Once the virtual environment is created, you can then use either pip or conda to install project requirements, depending on how the virtual environment was created.

Once you have confirmed that Python 3 is installed locally, you can create a virtual environment with venv before installing your packages with pip.

Python Virtual Environments
We have chosen to use venv for virtual environments in this guide, because it is included with Python 3. You are not limited to using venv, and can just as easily install Great Expectations into virtual environments with tools such as virtualenv, pyenv, etc.

Depending on whether you found that you needed to run python or python3 in the previous step, you will create your virtual environment by running either:

Terminal command
python -m venv my_venv

or

Terminal command
python3 -m venv my_venv

This command will create a new directory called my_venv where your virtual environment is located. In order to activate the virtual environment run:

Terminal command
source my_venv/bin/activate
tip

You can name your virtual environment anything you like. Simply replace my_venv in the examples above with the name that you would like to use.

Once your virtual environment is activated, you should ensure that you have the latest version of pip installed.

Pip is a tool that is used to easily install Python packages. If you have Python 3 installed you can ensure that you have the latest version of pip by running either:

Terminal command
python -m ensurepip --upgrade

or

Terminal command
python3 -m ensurepip --upgrade

3. Install Great Expectations

Once you have your virtual environment created and activated, you will be able to use either pip or Anaconda to install Great Expectations.

You can use pip to install Great Expectations by running the appropriate pip command below:

Terminal command
python -m pip install great_expectations

or

Terminal command
python3 -m pip install great_expectations

4. Verify Great Expectations installation succeeded

You can confirm that installation worked by running:

Terminal command
great_expectations --version

This should return something like:

Terminal output
great_expectations, version 0.16.15

🚀🚀 Congratulations! 🚀🚀 You successfully installed Great Expectations.