Before starting you will need Python 2.7.x or Python 3. You need to have numpy, scipy, and pip installed and we recommend installing Anaconda/Miniconda for your desired Python version.

There are a couple of optional components of pySOT that needs to be installed manually:

  1. scikit-learn: Necessary in order to use the Gaussian process regression. The minimum version is 0.18.1. Can be installed using

    pip install "scikit-learn >= 0.18.1"
  2. py-earth: Implementation of MARS. Can be installed using:

    pip install six http://github.com/scikit-learn-contrib/py-earth/tarball/master


    git clone git://github.com/scikit-learn-contrib/py-earth.git
    cd py-earth
    pip install six
    python setup.py install
  3. mpi4py: This module is necessary in order to use pySOT with MPI. Can be installed through pip:

    pip install mpi4py

    or through conda (Anaconda/Miniconda) where it can be channeled with your favorite MPI implementation such as mpich:

    conda install --channel mpi4py mpich mpi4py
  4. subprocess32: A backport of the subprocess module for Python 3.2 that works for Python 2.7. This is the recommended way of launching workers through subprocesses for Python 2.7 and this module is easily installed using:

    pip install subprocess32
  5. matlab_wrapper: A module that can be used to create MATLAB sessions for older MATLAB versions where there is no default MATLAB engine. Easily instead using:

    pip install matlab_wrapper
  6. PySide: If you want to use the GUI you need to install PySide. This can be done with pip:

    pip install PySide


There are currently two ways to install pySOT:

  1. (Recommended) The easiest way to install pySOT is through pip in which case the following command should suffice:

    pip install pySOT
  2. The other option is cloning the repository and installing.

2.1. Clone the repository:
git clone https://github.com/dme65/pySOT
2.2. Navigate to the repository using:
cd pySOT
2.3. Install pySOT (you may need to use sudo for UNIX):
python setup.py install

Several examples problems are available at ./pySOT/test or in the pySOT.test module