Installing Sprout
Preparing to install Sprout
Before installing Sprout, you need to have Python and a Python package manager installed. For the latter, we recommend using uv which can be installed via a shell script or via pipx.
To check that these programs are installed, run the following commands in your Terminal:
Terminal
python3 --version
uv --versionIf Python and uv are installed, these commands will show you the versions installed on your system. If you get an error, you need to install them before continuing.
Setting up a Python project
While you could install Sprout globally (e.g. with pip or pipx), we recommend installing it (and any other Python packages you use) locally in a separate virtual environment for each project you are working on. This makes it easier to keep track of which package versions you are using for a specific project which in turn increases reproducibility.
The first step in creating a virtual environment for your project, is to use uv to initialize a Python project. You can create a new project by running the following command in your Terminal (assuming we want to call our project diabetes-study):
Terminal
uv init diabetes-studyThis will create a new directory called diabetes-study with the basic structure of a Python project:
diabetes-study/
├── .git/
├── .gitignore
├── .python-version
├── README.md
├── main.py
└── pyproject.toml
Of the files created, the most important ones for your Data Package are the pyproject.toml and main.py files. The pyproject.toml file is used to manage the dependencies of the project, while the main.py file is where you will coordinate the Python scripts in your project. As you can see, uv also created the folder as a Git repository, so that you can keep the changes you make under version control.
Adding useful files via a project template
In addition to project structure created by uv init, there are other configuration files that could help you work in a reproducible and effective manner with your data, e.g. by setting up code formatting and adding license information. We have created a project template that allows you to easily copy these files into your newly created Python project without having to create them all from scratch.
We recommend that you use this template by following the project template documentation under the headings “Installing” and “Creating a new Data Package”.
Installing Sprout in the project’s virtual environment
After creating the project, open the project folder (in this case diabetes-study) in your Terminal. You can now install Sprout locally in the project’s virtual environment with the following command:
Terminal
uv add seedcase-sproutIf the command runs successfully, the output should include a line saying something like “Installed 13 packages in 10ms”, followed by a list of the installed packages which includes Sprout and all its required dependencies.
Now that you have installed Sprout, the next step is to use it to create and manage your data and metadata as a “Data Package”. This is what you will learn about in the next section of this guide.