Installation Guide#

1 System Requirements#

Installation Requirements:

  • Python >= 3.7 (3.7 is recommended!)

Supported Systems:

  • Linux (Ubuntu, …)

  • macOS

  • Windows

2 Preparations before Installation#

We STRONGLY suggest you to create a Python environment via Anaconda:

conda create -n openbox python=3.7
conda activate openbox

Then we recommend you to update your pip, setuptools and wheel as follows:

pip install --upgrade pip setuptools wheel

3 Install OpenBox#

3.1 Installation from PyPI#

To install OpenBox from PyPI, simply run the following command:

pip install openbox

For advanced features, install SWIG first and then run pip install "openbox[extra]".

3.2 Manual Installation from Source#

To install the newest OpenBox from the source code, please run the following commands:

git clone && cd open-box
pip install .

Also, for advanced features, install SWIG first and then run pip install ".[extra]".

3.3 Test for Installation#

You can run the following code to test your installation:

from openbox import run_test

if __name__ == '__main__':

If successful, you will receive the following message:

===== Congratulations! All trials succeeded. =====

If you encountered any problem during installation, please refer to the Trouble Shooting section.

4 Installation for Advanced Features (Optional)#

To use advanced features such as pyrfr (probabilistic random forest) surrogate and get hyper-parameter importance from history, please install SWIG first, and then run:

pip install "openbox[extra]"

If you encounter problems installing pyrfr, please refer to Pyrfr Installation Guide.

5 Trouble Shooting#

If you encounter problems not listed below, please File an issue on GitHub.


  • ‘Error: [WinError 5] Access denied’. Please open the command prompt with administrative privileges or append --user to the command line.

  • ‘ERROR: Failed building wheel for ConfigSpace’. Please refer to tips.

  • For Windows users who have trouble installing lazy_import, please refer to tips. (Deprecated in 0.7.10)