Installing DFO-LS

Requirements

DFO-LS 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: DFO-LS 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 DFO-LS to work, and it is not installed by default.

Installation using conda

DFO-LS can be directly installed in Anaconda environments using conda-forge:

$ conda install -c conda-forge dfo-ls

Installation using pip

For easy installation, use pip (http://www.pip-installer.org/) as root:

$ pip install DFO-LS

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

$ pip install --upgrade DFO-LS

to upgrade DFO-LS to the latest version.

Manual installation

Alternatively, you can download the source code from Github and unpack as follows:

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

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

$ pip install .

To upgrade DFO-LS to the latest version, navigate to the top-level directory (i.e. the one containing pyproject.toml) and rerun the installation using pip, as above:

$ git pull
$ pip install .

Testing

If you installed DFO-LS manually, you can test your installation using the pytest package:

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

Alternatively, this documentation provides some simple examples of how to run DFO-LS.

Uninstallation

If DFO-LS was installed using pip you can uninstall as follows:

$ pip uninstall DFO-LS

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