Installing Py-BOBYQA

Requirements

Py-BOBYQA requires the following software to be installed:

Additionally, the following python packages should be installed (these will be installed automatically if using pip, see Installation using pip):

Optional package: Py-BOBYQA versions 1.2 and higher also support the trustregion package for fast trust-region subproblem solutions. To install this, make sure you have a Fortran compiler (e.g. gfortran) and NumPy installed, then run pip install trustregion. You do not have to have trustregion installed for Py-BOBYQA to work, and it is not installed by default.

Installation using pip

For easy installation, use pip:

$ pip install Py-BOBYQA

Note that if an older install of Py-BOBYQA is present on your system you can use:

$ pip install --upgrade Py-BOBYQA

to upgrade Py-BOBYQA to the latest version.

Manual installation

The source code for Py-BOBYQA is available on Github:

$ git clone https://github.com/numericalalgorithmsgroup/pybobyqa
$ cd pybobyqa

Py-BOBYQA is written in pure Python and requires no compilation. It can be installed using:

$ pip install .

To upgrade Py-BOBYQA to the latest version, navigate to the top-level directory (i.e. the one containing setup.py) and rerun the installation using pip, as above:

$ git pull
$ pip install .

Testing

If you installed Py-BOBYQA manually, you can test your installation using the pytest package:

$ pip install pytest
$ python -m pytest --pyargs pybobyqa

Uninstallation

If Py-BOBYQA was installed using pip you can uninstall as follows:

$ pip uninstall Py-BOBYQA

If Py-BOBYQA was installed manually you have to remove the installed files by hand (located in your python site-packages directory).