InstallationΒΆ

Note

SWIG Dependency

Ensure that SWIG is installed on your system by running:

swig --version

If it is not installed, use the appropriate method for your platform:

  • macOS:

    brew install swig
    
  • Ubuntu/Linux:

    sudo apt-get install swig
    (or use your distribution's package manager)
    
  • Windows: Download and install from the official SWIG website and make sure to add it to your system PATH.

It is easiest to use LLaMEA from the PyPI package:

pip install llamea

Important

The Python version must be >= 3.11.5. An OpenAI/Gemini/Ollama API key is needed for using LLM models.

Feature-guided mutation (feature_guided_mutation=True) needs XGBoost, which is large (~290 MB on Linux), so it is an optional extra:

pip install "llamea[feature-guidance]"

You can also install the package from source using uv (0.7.19). make sure you have uv installed.

  1. Clone the repository:

    git clone https://github.com/xai-liacs/LLaMEA.git
    cd LLaMEA
    
  2. Install the required dependencies via uv:

    uv sync
    
  3. Optionally install dev or/and example dependencies:

    uv sync --dev --group examples
    

    The plasmonic nanostructure problem in benchmarks/tuto_global_optimization_photonics additionally needs pyGDM2, which is not part of any group because it requires numpy<=2.3. Install it separately if you need that problem:

    uv pip install pyGDM2