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..
Great Expectations is developed and tested on macOS and Linux Ubuntu. The installation on Windows may differ from the following procedure. If you have questions oer encounter issues, post your comments on the Great Expectations Slack channel.
If you're using a Mac M1, see Installing Great Expectations on a Mac M1.
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:
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:
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.
- pip
- conda
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
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:
python -m venv my_venv
or
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:
source my_venv/bin/activate
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:
python -m ensurepip --upgrade
or
python3 -m ensurepip --upgrade
Anaconda is a package and management system that supports Python. If you choose to go through the installation process using Anaconda, you will want to ensure that Anaconda is installed by running:
conda --version
If no version number is printed, you can download Anaconda here.
Once Anaconda is installed, you can create and activate a new virtual environment by running:
conda create --name YOUR_ENVIRONMENT_NAME
conda activate YOUR_ENVIRONMENT_NAME
Replace "YOUR_ENVIRONMENT_NAME" with the name you wish you use for your environment.
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.
- pip
- conda
You can use pip to install Great Expectations by running the appropriate pip command below:
python -m pip install great_expectations
or
python3 -m pip install great_expectations
You can use Anaconda to install Great Expectations by running:
conda install -c conda-forge great-expectations
4. Verify Great Expectations installation succeeded
You can confirm that installation worked by running:
great_expectations --version
This should return something like:
great_expectations, version 0.16.15
🚀🚀 Congratulations! 🚀🚀 You successfully installed Great Expectations.