How to install Great Expectations locally
This guide will help you Install Great Expectations locally for use with Python.
note
- 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#
Prerequisites
- 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 --versionIf this command returns something other than a Python 3 version number (like Python 3.X.X), you may need to try this:
python3 --version2. 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 venvor
python3 -m venv venvThis 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/activateFinally, 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 --upgradepython -m pip install great_expectationsor
python3 -m ensurepip --upgradepython3 -m pip install great_expectationsOnce you have confirmed that Python 3 is installed locally, you will want to ensure that Anaconda is installed by running:
conda --versionIf 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_NAMEconda activate YOUR_ENVIRONMENT_NAMEReplace "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-expectationsYou can confirm that great_expectations was successfully installed with:
great_expectations --versionππ Congratulations! ππ You successfully installed Great Expectations.