Installation

Prerequisites

  • Python 3.8+

  • Rust (the package is built from Rust source)

  • uv (this project uses uv for environment and package management)

Setup and Installation via pip

  1. Create and activate a virtual environment:

    # Create the environment
    uv venv powerlaw
    
    # Activate the environment
    source powerlaw/bin/activate
    
  2. Install the package.

    uv pip install powerlawrs
    

Setup and Installation from Source

  1. Clone the repository:

    git clone https://github.com/aulichny3/powerlawrs.git
    cd powerlawrs
    
  2. Create and activate a virtual environment: This project is configured to use the powerlaw virtual environment with uv.

    # Create the environment
    uv venv -p powerlaw
    
    # Activate the environment
    source powerlaw/bin/activate
    
  3. Install the package: To install the package in editable mode and include all development dependencies, run:

    # Install maturin
    uv tool install maturin
    
    # Install the package using maturin
    uv tool run maturin develop --uv
    
    # Install development dependencies
    uv pip install -r requirements.txt
    

    This installs powerlawrs in editable mode, so any changes you make to the source code will be immediately available.