Skip to content

Installation Guide

Welcome to Phytospatial! This guide will help you download the code, set up a secure Python environment, and install the package using your preferred package manager.

Prerequisites

Before starting, ensure you have the following installed:


1. Set Up Your Environment

To avoid conflicts with other software, we recommend creating a dedicated virtual environment for this project. Choose one of the methods below.

This is ideal if you want a self-contained environment that manages both Python and non-Python dependencies. NOTE: You can also download our environment.yml file and create the environment from there.

Create and name your environment:

conda create -n phytospatial_env python=3.10

Activate the new environment:

conda activate phytospatial_env

Install Phytospatial from PyPI:

pip install phytospatial

Option B: Using Standard Python (pip)

Use this if you prefer a lightweight, native Python setup.

Create the virtual environment:

  • Windows:
python -m venv venv
  • Mac/Linux:
python3 -m venv venv

Activate the environment:

  • Windows:
.\venv\Scripts\activate
  • Mac/Linux:
source venv/bin/activate

Install dependencies manually:

pip install --upgrade pip pip install phytospatial

2. Install optional dependencies

If you intend to perform advanced spatial analysis, you can install the extra feature set:

pip install "phytospatial[analysis]"

3. Verify Installation

Check that the package is correctly recognized by your system:

python -c "import phytospatial; print('Phytospatial version ' + phytospatial.version + ' installed successfully!')"