Skip to content

Latest commit

 

History

History
98 lines (67 loc) · 1.81 KB

installation.md

File metadata and controls

98 lines (67 loc) · 1.81 KB

Installation Guide

Prerequisites

Before installing Safeguards, make sure you have:

  • Python 3.10 or newer
  • pip package manager

Basic Installation

Install the package using pip:

pip install agent-safeguards

This will install the core package with all required dependencies.

Development Installation

For development work, install with additional development dependencies:

pip install agent-safeguards[dev]

This includes:

  • Testing tools (pytest, pytest-asyncio, pytest-cov)
  • Code formatting (black, isort)
  • Linting (flake8)
  • Type checking (mypy)

Documentation Installation

To build documentation locally:

pip install agent-safeguards[docs]

This includes:

  • Sphinx documentation generator
  • Read the Docs theme
  • Type hints support

Verifying Installation

You can verify the installation by running:

from safeguards import BudgetManager, ResourceMonitor
from safeguards.types import Agent

# Should not raise any ImportError

System Dependencies

The package requires psutil for system resource monitoring. On some systems, you might need to install additional system packages:

Ubuntu/Debian

sudo apt-get update
sudo apt-get install python3-dev

CentOS/RHEL

sudo yum install python3-devel

macOS

No additional system packages required.

Windows

No additional system packages required.

Troubleshooting

Common Issues

  1. ImportError: No module named 'psutil'

    pip install --no-cache-dir psutil
  2. Build failures on Windows

    pip install --upgrade setuptools wheel
  3. Permission errors during installation

    pip install --user agent-safeguards

For more issues, please check our GitHub Issues page.