How to install Great Expectations locally
This guide will help you Install Great Expectations locally for use with Python.
- Great Expectations is developed and tested on macOS and Linux Ubuntu. Installation for Windows users may vary from the steps listed below. If you have questions, feel free to reach out to the community on our Slack channel.
- If you have the Mac M1, you may need to follow the instructions in this blog post: Installing Great Expectations on a Mac M1.
Steps
- Great Expectations requires Python 3. For details on how to download and install Python on your platform, see python.org.
1. Check Python version
First, check that you have Python 3 installed. 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. Install Great Expectations
You can use either pip or Anaconda to install Great Expectations.
- pip
- conda
Once you have confirmed that Python 3 is installed locally, you can create a virutal environment with venv.
Python Virtual Environments
Depending on whether you found that you needed
to run python
or
python3
in the previous step, you
will run either:
python -m venv venv
or
python3 -m venv venv
This command will create a new directory called
venv
where your virtual environment
is located. In order to activate the virtual
environment run:
source venv/bin/activate
Finally, you can ensure the latest version of
pip is installed, and install Great
Expectations, by running the appropriate pair of
python
commands below:
python -m ensurepip --upgrade
python -m pip install great_expectations
or
python3 -m ensurepip --upgrade
python3 -m pip install great_expectations
Once you have confirmed that Python 3 is installed locally, 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.
Finally, you can install Great Expectations by running:
conda install -c conda-forge great-expectations
You can confirm that great_expectations was successfully installed with:
great_expectations --version
🚀🚀 Congratulations! 🚀🚀 You successfully installed Great Expectations.