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
-
Download Ecopath with Ecosim: Obtain Ecopath with Ecosim v6.7 and note the installation path (the directory containing
EwECore.dll). -
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.
-
Install Project Dependencies: Navigate to the
PyEwEproject directory in your terminal and run:This command installs all necessary Python packages specified in the project configuration.uv sync -
Set Environment Variable: Add an environment variable
EWE_BIN_PATHthat points to the directory containing the EwE binaries (e.g., whereEwECore.dllis located).Powershell (Windows):
To make this permanent, you can add it to your PowerShell profile or set it through the System Properties dialog.$env:EWE_BIN_PATH="C:\Path\To\Your\EwE\Binaries"bash (Linux/macOS):
To make this permanent, add theexport EWE_BIN_PATH="/path/to/your/ewe/binaries"exportcommand 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.
Quick Links
- 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.