Skip to main content
Version: 1.0 prerelease

Install GX 1.0

To use GX 1.0, you need to install Python and the GX 1.0 Python library. GX also recommends you set up a virtual environment for your GX Python projects.

Prerequisites

Install Python

  1. Reference the official Python documentation to install an appropriate version of Python.

GX Requires Python, version 3.8 to 3.11, which can be found on the official Python downloads page.

  1. Verify your Python installation.

Run the following command to display your Python version:

Terminal input
python --version

You should receive a response similar to:

Terminal output
Python 3.8.6

(Optional) Create a virtual environment

Although it is an optional step the best practice when working with a Python project is to do so in a virtual environment. A virtual environment ensures that any libraries and dependencies that you install as part of your project do not encounter or cause conflicts with libraries and dependencies installed for other Python projects.

There are various tools such as virtualenv and pyenv which can be used to create a virtual environment. This example uses venv because it is included with Python 3.

  1. Create the virtual environment with venv.

To create your virtual environment, run the following code from the folder the environment should reside in:

Terminal input
python -m venv my_venv

This command creates a new directory named my_venv which will contain your virtual environment.

Virtual environment names

If you wish to use a different name for your virtual environment, replace my_venv in the example with the name you would prefer. You will also have to replace my_venv with your virtual environment's actual name in any other example code that includes my_venv.

  1. (Optional) Test your virtual environment by activating it.

Activate your virtual environment by running the following command from the folder it was installed in:

Terminal input
source my_venv/bin/activate

Install the GX 1.0 Python library

GX 1.0 is a Python library and as such can be used with a local Python installation to access the functionality of GX through Python scripts.

Installation and setup

  1. (Optional) Activate your virtual environment.

If you created a virtual environment for your GX Python installation, navigate to the folder that contains your virtual environment and activate it by running the following command:

Terminal input
source my_venv/bin/activate
  1. Ensure you have the latest version of pip:
Terminal input
python -m ensurepip --upgrade
  1. Install the GX 1.0 library:
Terminal input
pip install great_expectations
  1. Verify that GX installed successfully with the CLI command:
Terminal input
great_expectations --version

The output you receive if GX was successfully installed will be:

Terminal output
great_expectations, version 1.0.0a2

Next steps