Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Slycot: a wrapper for the SLICOT control and systems library

Project description

Python wrapper for selected SLICOT routines, notably including solvers for Riccati, Lyapunov, and Sylvester equations.


Slycot supports Python versions 2.7 and >=3.5.

To run the compiled Slycot package, the following must be installed as dependencies:

  • Python 2.7, 3.5+
  • NumPy

If you are compiling and installing Slycot from source, you will need the following dependencies:

  • Python 2.7, 3.5+
  • NumPy
  • scikit-build >=0.8.1
  • cmake
  • C compiler (e.g. gcc, MS Visual C++)
  • FORTRAN compiler (e.g. gfortran, ifort, flang)

There are a variety of ways to install these dependencies on different operating systems. See the individual packages’ documentation for options.


In general Slycot requires non-trivial compilation to install on a given system. The easiest way to get started using Slycot is by installing pre-compiled binaries. The Slycot team provides pre-compiled binaries via the conda package manager and conda forge package hosting channel for Linux, OSX, and Windows.

Using conda

Install Miniconda or Anaconda and then Slycot can be installed via the conda package manager from the conda-forge channel with the following command:

conda install -c conda-forge slycot

Using pip

Slycot can also be installed via the pip package manager. Install pip as per recommendations in pip’s documentation. At a minimum, Python and pip must be installed. If a pre-complied binary (i.e. “wheel”) is available it will be installed with no need for compilation. If not, pip will attempt to compile the package from source and thus the compilation dependencies will be required (scikit-build, gfortran, BLAS, etc.).

Pip can then be used to install Slycot with the command:

pip install slycot

From source

Unpack the course code to a directory of your choice, e.g. /path/to/slycot_src/

If you need to specify a specific compiler, set the environment variable FC before running the install:

# Linux/OSX:
export FC=/path/to/my/fortran

# Windows:
set FC=D:\path\to\my\fortran.exe

To build and install execute:

cd /path/to/slycot_src/
python install

You can also use conda to build and install Slycot from source:

conda build conda-recipe
conda install --use-local slycot

If you prefer to use the OpenBLAS library, a conda recipe is available in conda-recipe-openblas.

Additional tips for how to install Slycot from source can be found in the .travis.yml (commands used for Travis CI) and conda-recipe/ (conda pre-requisites) both which are included in the source code repository.

The hardest part about installing from source is getting a working version of FORTRAN and LAPACK installed on your system and working properly with Python. On Windows, the build system currently uses flang, which can be installed from conda-forge. Note that flang is incompatible with Python 2.7.

If you are using conda, you can also get working (binary) copies of LAPACK from conda-forge using the command:

conda install -c conda-forge lapack

Slycot will also work with the OpenBLAS libraries.

Note that in some cases you may need to set the LIBRARY_PATH environment variable to pick up dependencies such as -lpythonN.m (where N.m is the version of python you are using).

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for slycot, version
Filename, size File type Python version Upload date Hashes
Filename, size slycot- (1.5 MB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page