Skip to content

PyEwE

Welcome to PyEwE! This tool utilizes Ecopath with Ecosim to explore a wide range of contaminant release and modelling scenarios.

This documentation provides guidance on setup, usage, and development.

Supports Ecopath with Ecosim v6.7.

Setup

  1. Download Ecopath with Ecosim: Obtain Ecopath with Ecosim v6.7 and note the installation path (the directory containing EwECore.dll).

  2. Install Python Environment Manager: We recommend uv for managing Python versions and dependencies. Install it if you haven't already. Restart your terminal after installation.

  3. Install Project Dependencies: Navigate to the PyEwE project directory in your terminal and run:

    uv sync
    
    This command installs all necessary Python packages specified in the project configuration.

  4. Set Environment Variable: Add an environment variable EWE_BIN_PATH that points to the directory containing the EwE binaries (e.g., where EwECore.dll is located).

    Powershell (Windows):

    $env:EWE_BIN_PATH="C:\Path\To\Your\EwE\Binaries"
    
    To make this permanent, you can add it to your PowerShell profile or set it through the System Properties dialog.

    bash (Linux/macOS):

    export EWE_BIN_PATH="/path/to/your/ewe/binaries"
    
    To make this permanent, add the export command to your shell's configuration file (e.g., ~/.bashrc, ~/.zshrc).

    The library will attempt to automatically initialize with this path. If this variable is not set, or you need to use a different path at runtime, you can call the initialise() function manually in your Python script.

  • See High Level Interface for a guide on how to use the library with examples.
  • See Medium Level Interface for a guide on how to use the library with more control over initialisation and parameter setting.
  • Explore the API Reference for detailed information on classes and functions.
  • For developers, the Development Notes provide insights into the library's internals and setup for contribution.