This guide provides detailed instructions for installing Ember in different environments.
- Python: 3.9 or newer (3.10, 3.11, and 3.12 supported)
- Operating System: macOS, Linux, or Windows
uv is the recommended package manager for Ember. It is extremely fast (10-100x faster than pip) and simplifies Python environment management.
-
Install uv if you don't have it already:
# On macOS and Linux curl -LsSf https://astral.sh/uv/install.sh | sh # On Windows powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" # Or with pip if you prefer pip install uv # Verify the installation uv --version
-
Install Ember from PyPI:
# Install Ember directly (creates a virtual environment automatically if needed) uv pip install ember-ai # Run examples without activating an environment
-
Install from source:
# Clone the repository git clone https://github.com/pyember/ember.git cd ember # Install in development mode (editable installation) uv pip install -e "." # Run examples directly without environment activation uv run python src/ember/examples/basic/minimal_example.py
By default, this installs Ember with OpenAI, Anthropic, and Google/Deepmind provider support.
If you want to develop or contribute to Ember:
-
Clone the repository:
git clone https://github.com/pyember/ember.git cd ember -
Install with development dependencies:
# Install including development dependencies uv pip install -e ".[dev]" # Run commands directly with uv uv run pytest
-
Running tools:
# Run linters, formatters, and other tools without installation uvx black src tests uvx mypy src uvx pytest
If you prefer using standard pip or don't want to install uv:
# Create a virtual environment (recommended)
python -m venv ember_env
source ember_env/bin/activate # On Windows: ember_env\Scripts\activate
# Install Ember with pip
pip install ember-ai
# For development installation
pip install -e ".[dev]"Note: This method is significantly slower for dependency resolution and doesn't provide the environment management benefits of uv.
On macOS, you might encounter issues with the default Python installation:
# If you encounter Python-related errors:
# Install Python using Homebrew (recommended)
brew install python@3.11
# Use the Homebrew Python with uv
/opt/homebrew/bin/python3.11 -m pip install uv
/opt/homebrew/bin/python3.11 -m uv pip install -e "."On Windows, ensure you have the latest Python installed from python.org:
# Add uv to your PATH if needed
$env:PATH += ";$env:USERPROFILE\.uv\bin"
# Install and run directly
uv pip install -e "."
uv run python src/ember/examples/basic/minimal_example.pyIf you encounter Python version errors:
# Check your Python version
python --version
# Specify a Python version for uv
uv venv --python=3.11
source .venv/bin/activate
# Or run with a specific Python version
uv run --python=3.11 -- python script.pyIf you have problems with uv:
# Ensure uv is in your PATH
which uv
# Update uv to the latest version
uv self update
# Reinstall uv if needed
pip install --upgrade uvIf you have problems with virtual environments:
# Create a fresh virtual environment
uv venv --force
# Activate the environment
source .venv/bin/activate # On Windows: .venv\Scripts\activateSee ENVIRONMENT_MANAGEMENT.md for more details on managing environments.
If you encounter dependency conflicts:
# Try reinstalling without using cache
uv pip install -e "." --no-cache
# Install with specific package versions if needed
uv pip install -e "." --no-deps
uv pip install "specific-package==version"When using conda with or without uv, you may encounter known pyarrow installation issues.
# Try installing pyarrow from conda-forge
conda install -c conda-forge pyarrow
After installation, verify everything is working:
# From the project root directory, using uv
uv run python src/ember/examples/basic/minimal_example.py
# Or if you're in an activated virtual environment
python src/ember/examples/basic/minimal_example.pyIf you encounter issues with installation:
- Check our GitHub Issues
- Review the ENVIRONMENT_MANAGEMENT.md guide
- See the TESTING_INSTALLATION.md for verification steps