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:
This will install the core package with all required dependencies.
Development Installation
For development work, install with additional development dependencies:
This includes: - Testing tools (pytest, pytest-asyncio, pytest-cov) - Code formatting (black, isort) - Linting (flake8) - Type checking (mypy)
Documentation Installation
To build documentation locally:
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
CentOS/RHEL
macOS
No additional system packages required.
Windows
No additional system packages required.
Troubleshooting
Common Issues
-
ImportError: No module named 'psutil'
-
Build failures on Windows
-
Permission errors during installation
For more issues, please check our GitHub Issues page.