Install the Gantry SDK#
The Gantry SDK is distributed as a Python package via Gemfury. This page contains installation instructions.
(Optional) Python Version and Environment Management#
We strongly recommend using pyenv to manage Python versions and venv for Python package management.
Create a Python Virtual Environment#
We recommending using venv
to create Python virtual environment for your project. venv
is included in most versions of Python 3.
Create a virtual environment named venv
:
python -m venv venv
Activate the virtual environment:
source venv/bin/activate
You should now see (venv)
in your shell prompt.
IMPORTANT: make sure the virtual environment is activated before installing new packages and using python.
Install Gantry#
Gantry is installed in the usual way with pip
. Once you have the proper python environment setup for your machine, you can simply install the Gantry SDK uwith the following:
pip install gantry
Validate your installation by running import gantry
from a python shell:
$ python
>>> import gantry
If you don’t receive an error importing, then you’ve successfully installed the Gantry SDK and are ready to use it.
You can add it to your requirements.txt like so:
# Simply adding the "latest" to requirements.txt
gantry
Specify the gantry version anywhere in the requirements list#
gantry==0.4.5
Next, head on over to our getting started guide for step-by-step instructions on how to get started using Gantry!