Installation

Before installation

We strongly recommend installing the SpatioCoexistence-package in a virtual environment to avoid conflicts with other Python packages and ensure a clean, reproducible setup.

What is a virtual environment?

A virtual environment is an isolated Python environment that allows you to install packages without affecting your system Python installation or other projects. This is considered best practice for Python development and data analysis.

For more details, see the official Python documentation.

Creating a virtual environment

# Create a new virtual environment
python -m venv .venv

# Activate the environment
source .venv/bin/activate
# Create a new virtual environment
python -m venv .venv

# Activate the environment
.venv\Scripts\activate

Install from Source (Current Method)

Since SpatioCoexistence is not yet published to PyPI, install it directly from the Git repository into your activated virtual environment:

pip install git+https://git.ufz.de/heinzej/CrowdingIndex.git

Development Installation

To make local modifications or develop SpatioCoexistence, first clone the repository. Then you can use pip again to install the package.

# Clone the repository
git clone https://git.ufz.de/heinzej/CrowdingIndex.git
cd CrowdingIndex

# Install in development mode
pip install -e .

Requirements

Development Requirements

Core Dependencies

The following packages are automatically installed with Spatiocoexistence:

  • NumPy

  • SciPy: Really, double check

  • Pandas (≥1.5.0)

  • Matplotlib

  • Py-BOBYQA (≥1.4.1): Optimization algorithms for parameter fitting