Skip to content

Sedpack Installation

Installation of the Sedpack Python package.

All one should need to install the package from PyPI is:

Terminal window
pip install sedpack

If you plan to use TensorFlow features (such as the "tfrec" shard format or as_tfdataset), TensorFlow needs to be installed as well:

Terminal window
pip install "sedpack[tf]"

Note that this is the latest stable version of the package. If you want the bleeding edge features install from source instead.

One can always opt for installation from the source.

Development dependencies:

Clone and create a Python virtual environment:

Terminal window
git clone github.com/google/sedpack/ # Clone the repository
python3 -m venv my_env # Create Python virtual environment
source my_env/bin/activate # Activate your virtual environment
cd sedpack/ # Change directory to the cloned git repository

[optional] Install pinned Python dependencies:

Terminal window
python3 -m pip install --require-hashes -r requirements.txt

Install sedpack with development dependencies and TensorFlow:

Terminal window
python3 -m pip install --editable '.[dev,tf]'

Or for a minimal installation without development or TensorFlow dependencies:

Terminal window
python3 -m pip install --editable .

[optional] Run unit-tests (none should be skipped when TensorFlow is installed):

Terminal window
python -m pytest

[optional] Rebuild the Rust library after a change:

Terminal window
maturin develop --release