Skip to main content

Installation Options

Swarms can be installed in multiple ways depending on your preferences and development environment. Choose the method that best fits your workflow.

pip

Standard Python package installation

uv

Fast Rust-based installer (Recommended)

poetry

Modern dependency management

From Source

Development and contribution

Prerequisites

Before installing Swarms, ensure you have:
  • Python 3.10 or higher installed on your system
  • pip package manager (usually comes with Python)
  • An active internet connection
You can check your Python version by running python --version or python3 --version in your terminal.

Installation Methods

# Install the latest version of Swarms
pip3 install -U swarms
uv is a fast Python package installer and resolver, written in Rust. It offers significant performance improvements over traditional pip:

10-100x Faster

Dramatically faster installation times compared to pip

Better Dependency Resolution

More reliable dependency resolution and conflict detection

Drop-in Replacement

Works as a direct replacement for pip commands

Verify Installation

After installation, verify that Swarms is correctly installed:
import swarms

print(f"Swarms version: {swarms.__version__}")
print("Swarms is ready!")
You can also run this as a one-liner:
python -c "import swarms; print('Swarms is ready!')"

Installing Specific Versions

If you need a specific version of Swarms:
# Install a specific version
pip3 install swarms==1.0.0

# Install the latest pre-release
pip3 install --pre swarms

Development Installation

If you’re planning to contribute to Swarms or need the latest development features:
1

Clone the repository

git clone https://github.com/kyegomez/swarms.git
cd swarms
2

Install in editable mode

# Using pip
pip install -e .

# Or using uv
uv pip install -e .
3

Install development dependencies

pip install -r requirements.txt
4

Verify the installation

python -c "import swarms; print('Development installation successful!')"
Installing in editable mode (-e flag) allows you to modify the source code and see changes immediately without reinstalling.

Optional Dependencies

Swarms has optional dependencies for specific features:
# Install with all optional dependencies
pip3 install swarms[all]

# Install with specific extras
pip3 install swarms[tools]      # Additional tool integrations
pip3 install swarms[ui]         # Web UI components
pip3 install swarms[dev]        # Development tools
It’s recommended to install Swarms in a virtual environment to avoid conflicts with other packages:
# Create a virtual environment
python -m venv swarms-env

# Activate the environment
# On Linux/Mac:
source swarms-env/bin/activate
# On Windows:
swarms-env\Scripts\activate

# Install Swarms
pip install swarms

Platform-Specific Notes

On macOS, you might need to install command-line tools:
xcode-select --install
If you’re using Apple Silicon (M1/M2), ensure you’re using a compatible Python version.
On Windows, you might need to install Microsoft C++ Build Tools:
  1. Download from Microsoft C++ Build Tools
  2. Install “Desktop development with C++” workload
Also, use python instead of python3 in commands.
On Linux, you might need to install additional system dependencies:
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install python3-dev build-essential

# Fedora/RHEL
sudo dnf install python3-devel gcc

Upgrading Swarms

To upgrade to the latest version:
pip3 install -U swarms

Uninstalling Swarms

If you need to uninstall Swarms:
pip3 uninstall swarms

Troubleshooting

If you encounter permission errors, try:
# Add --user flag (not recommended with virtual environments)
pip3 install --user swarms

# Or use sudo (not recommended)
sudo pip3 install swarms
Better solution: Use a virtual environment to avoid permission issues.
If you encounter SSL errors:
pip3 install --trusted-host pypi.org --trusted-host files.pythonhosted.org swarms
If you have dependency conflicts:
  1. Create a fresh virtual environment
  2. Install Swarms first before other packages
  3. Use uv for better dependency resolution
If you can install but can’t import:
  1. Check you’re using the correct Python interpreter
  2. Verify the virtual environment is activated
  3. Try reinstalling: pip uninstall swarms && pip install swarms

Next Steps

Now that you’ve installed Swarms, proceed to:

Environment Setup

Configure your API keys and workspace

Quickstart Guide

Create your first agent in minutes
Need help with installation? Join our Discord community for support!

Build docs developers (and LLMs) love