Skip to content

Installation

Prerequisites

  • Python 3.9 or higher

Install from PyPI

pip install scikit-rec

The package is also available under the alias skrec:

pip install skrec

Optional Dependencies

Torch Support

For PyTorch-based models (NCF, Two-Tower, DCN, NeuralFactorization, SASRec, HRNN, DeepFM):

pip install scikit-rec[torch]

AWS Support

For S3 data loading:

pip install scikit-rec[aws]

Development Dependencies

If you're contributing to the library:

# Clone the repository
git clone https://github.com/intuit/scikit-rec.git
cd scikit-rec

# Install in editable mode with dev extras
pip install -e ".[dev]"

Verify Installation

import skrec
print(skrec.__version__)

# Test with example datasets
from skrec.examples.datasets import (
    sample_binary_reward_interactions,
    sample_binary_reward_users,
    sample_binary_reward_items,
)

print("Installation successful!")
print(f"Example interactions: {sample_binary_reward_interactions.fetch_data().shape}")

Environment Support

The library works in multiple environments:

  • Local development (Jupyter notebooks, Python scripts)
  • Cloud notebooks (SageMaker, Colab, etc.)
  • Batch processing (Spark, Airflow)
  • Real-time inference (API endpoints)

Troubleshooting

ImportError: No module named 'skrec'

Solution: Ensure you have installed the package:

pip install scikit-rec

Permission Denied

Solution: Use a virtual environment:

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install scikit-rec

Next Steps