Installation Guide¶
Getting started with Mantis AI is straightforward. This guide will walk you through the installation process and help you set up your environment.
Developed by Paul Elliot
Prerequisites¶
Before installing Mantis AI, ensure you have:
- Python 3.9 or higher
- pip (Python package installer)
- A Gemini API key from Google AI Studio
Installing Mantis AI¶
Step 1: Install the Package¶
Install Mantis AI using pip:
pip install mantisai
This command installs the latest stable version of Mantis AI and all its dependencies.
Step 2: Set Up Your API Key¶
Mantis AI uses Google's Gemini API for processing audio. You'll need to set up your API key:
- Get a Gemini API key from Google AI Studio
- Set the API key in your environment:
# On Linux/macOS
export GEMINI_API_KEY="your-api-key-here"
# On Windows (Command Prompt)
set GEMINI_API_KEY=your-api-key-here
# On Windows (PowerShell)
$env:GEMINI_API_KEY = "your-api-key-here"
Alternatively, you can create a .env file in your project directory:
GEMINI_API_KEY=your-api-key-here
Step 3: Verify Installation¶
Verify that Mantis AI is installed correctly:
import mantis
# Print the version
print(mantis.__version__)
Optional Dependencies¶
For YouTube processing, Mantis AI uses yt-dlp which should be installed automatically. If you encounter any issues with YouTube functionality, you can install it manually:
pip install yt-dlp
Development Installation¶
If you want to contribute to Mantis AI or install the latest development version:
# Clone the repository
git clone https://github.com/paulelliotco/mantis-ai.git
cd mantis-ai
# Install in development mode
pip install -e .
# Install development dependencies
pip install -r requirements-dev.txt
Troubleshooting¶
Common Issues¶
-
API Key Not Found: Ensure your Gemini API key is correctly set in your environment or
.envfile. -
Import Error: If you encounter import errors, ensure you've installed the package correctly and are using a supported Python version.
-
YouTube Processing Issues: If you have problems with YouTube URLs, ensure yt-dlp is installed and up to date.
Getting Help¶
If you encounter any issues during installation:
- Check the GitHub Issues for similar problems
- Open a new issue if your problem hasn't been reported
Next Steps¶
Now that you've installed Mantis AI, check out the Quick Start Guide to learn how to use the library.