Requirements
The Mention Python Client requires:- Python 3.10 or higher
- pip (Python package installer)
The library supports Python 3.10, 3.11, 3.12, 3.13, and 3.14.
Check Your Python Version
Verify your Python version:Installation Methods
Using pip (Recommended)
Install the latest stable version from PyPI:Installing a Specific Version
To install a specific version:Upgrading
Upgrade to the latest version:Virtual Environment (Recommended)
It’s best practice to use a virtual environment to isolate your project dependencies:Development Installation
If you want to contribute to the project or need the latest development version:From Source
From GitHub
Install directly from the GitHub repository:Verify Installation
Confirm the installation was successful:Dependencies
The Mention Python Client automatically installs these dependencies:httpx
Modern HTTP client with sync and async support (≥0.28.1)
pydantic
Data validation using Python type hints (≥2.12.5)
python-dotenv
Environment variable management (≥1.2.0)
Environment Setup
Create a .env File
Store your API credentials securely:Custom Environment File
Load from a specific environment file:Custom Environment Variable Prefix
Use a different prefix for environment variables:Platform-Specific Notes
macOS
If you’re using the system Python, you might need to usepip3:
Linux
On some Linux distributions, you may need to install Python development headers:Windows
On Windows, ensure Python is in your PATH:- Download Python from python.org
- During installation, check “Add Python to PATH”
- Open Command Prompt or PowerShell:
Docker
Use the Mention Python Client in a Docker container:Dockerfile
Troubleshooting
ImportError: No module named 'mention'
ImportError: No module named 'mention'
This means the package isn’t installed. Try:If you’re using a virtual environment, make sure it’s activated.
pip: command not found
pip: command not found
pip might not be installed. Install it:
Permission denied errors
Permission denied errors
Use a virtual environment or install with the —user flag:
SSL Certificate errors
SSL Certificate errors
If you’re behind a corporate proxy, you may need to:
Version conflicts
Version conflicts
Use a fresh virtual environment to avoid dependency conflicts:
Next Steps
Now that you’ve installed the Mention Python Client:Quickstart Guide
Make your first API call in minutes
Authentication
Learn about authentication and configuration