Installation Guide¶
This guide will walk you through installing LEGIONHERCULES and its dependencies.
Prerequisites¶
System Requirements¶
- Operating System: Linux, macOS, or Windows with WSL
- Python: 3.9 or higher
- Memory: 8GB RAM minimum (16GB recommended)
- Storage: 5GB free space for models
Required Software¶
- Python 3.9+
Check your Python version:
- Ollama
Ollama is required for running LLMs locally.
macOS/Linux:
Windows: Download from ollama.com
Installation Methods¶
Method 1: Install from PyPI (Recommended)¶
Method 2: Install with Development Dependencies¶
Method 3: Install from Source¶
git clone https://github.com/deathlegion/legionhercules.git
cd legionhercules
pip install -e ".[dev]"
Post-Installation Setup¶
1. Start Ollama¶
Ensure Ollama is running:
You should see output like:
2. Download a Model¶
Pull your first model:
Or use LEGIONHERCULES:
Recommended Models:
| Model | Size | Best For |
|---|---|---|
| llama3.2 | 2GB | Fast, general purpose |
| llama3.1:8b | 4.7GB | Balanced speed/quality |
| codellama | 3.8GB | Code tasks |
| mistral | 4.1GB | Strong reasoning |
| phi3 | 2.3GB | Efficient, good quality |
3. Verify Installation¶
Test your installation:
# Check CLI is installed
legionhercules --version
# Test Ollama connection
legionhercules models --list
# Start a chat
legionhercules chat "Hello!"
Configuration¶
Initialize Config¶
Create a configuration file:
This creates ~/.legionhercules/config.yaml.
Environment Variables¶
You can override config with environment variables:
export LEGIONHERCULES_LLM_MODEL=llama3.1:8b
export LEGIONHERCULES_LLM_BASE_URL=http://localhost:11434
Troubleshooting¶
Ollama Connection Issues¶
Problem: Cannot connect to Ollama
Solution: 1. Check if Ollama is running:
-
Start Ollama if not running:
-
Check firewall settings for port 11434
Model Download Issues¶
Problem: Model download fails or is slow
Solution: 1. Check your internet connection 2. Try a smaller model first (llama3.2) 3. Use a download manager for large models
Python Import Errors¶
Problem: ModuleNotFoundError
Solution:
1. Ensure you're in the correct virtual environment
2. Reinstall: pip install --force-reinstall legionhercules
Permission Issues¶
Problem: Permission denied when writing files
Solution:
1. Check directory permissions
2. Run with appropriate user permissions
3. Ensure ~/.legionhercules directory is writable
Uninstallation¶
To remove LEGIONHERCULES:
To remove configuration:
Next Steps¶
- Read the Quick Start Guide
- Learn about Agents
- Explore Tools