Installing Sprout
🚧 Sprout is still in active development and evolving quickly, so the documentation and functionality may not work as described and could undergo substantial changes 🚧
Sprout assumes you have control over your system’s files and folders, or at least your user’s home directory. This includes having access to a server through the Terminal where you can write to specific folders.
Before installing Sprout, you need to have Python and pipx installed.
To check that these programs are installed, run the following commands in your Terminal:
Terminal
python3 --version
pipx --version
If Python and pipx 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.
Install Sprout in a virtual environment (recommended)
It’s generally recommended to install Python packages in a virtual environment to keep a project’s dependencies separate from the system-wide Python setup and avoid conflicts. There are several tools to manage package dependencies and create virtual environments, such as venv, virtualenv, and uv. For this guide, we will use uv.
If you don’t have uv installed, you can install it in your Terminal with pipx:
Terminal
pipx install uv
To check that uv is installed, run this command:
Terminal
uv
You can create a Python project using uv. In short, you can create a new project using uv by running the following command in your Terminal (assuming we make a new data package called diabetes-study
):
Terminal
uv init diabetes-study
This will create a new directory called diabetes-study
with the basic structure of a Python project. It should look like:
diabetes-study/
├── .git/
├── .gitignore
├── .python-version
├── README.md
├── main.py
└── pyproject.toml
uv also creates the folder as a Git repository. For more information on working on projects with uv, see their guide. 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.
You can generate the basic structure of a data package by using the Seedcase Project template-data-package
. There are instructions there on how to use it to make the initial structure of a data package.
After creating the project, open the project folder (in this case diabetes-study
) in your Terminal. Run the pwd
command to confirm that your working directory is the project folder.
You can now install Sprout directly from the GitHub repository:
Terminal
uv add git+https://github.com/seedcase-project/seedcase-sprout.git
Check that Sprout has been installed correctly by running this command:
Terminal
uv pip show seedcase_sprout
If Sprout has been installed successfully, the output will show details about Sprout.
Get started with your first data package by following the guide on Creating and managing data packages.
Install Sprout in system-wide
We strongly recommend using Sprout in a virtual environment, but you can also install it system-wide. The easiest way to do that is to use pipx:
Terminal
pipx install git+https://github.com/seedcase-project/seedcase-sprout.git
To check that Sprout has been installed correctly, run the following and make sure seedcase_sprout
is listed:
Terminal
pipx list
Now you can use Sprout in any Python script throughout your computer.