Skip to content

Commit

Permalink
Simplified and added clarity to the README.
Browse files Browse the repository at this point in the history
  • Loading branch information
moorepants committed May 23, 2019
1 parent 3a40b21 commit 352270b
Showing 1 changed file with 54 additions and 60 deletions.
114 changes: 54 additions & 60 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,109 +19,103 @@ Riccati, Lyapunov, and Sylvester equations.
Dependencies
------------

Supported Python versions are 2.7, and 3.5 and later.
Slycot supports Python versions 2.7 and >=3.5.

Slycot depends on Numpy and, if you are installing a binary distribution,
Numpy should be the only prerequisite (though you may need LAPACK
libraries as well, depending on your particular system configuration).
To run the compiled Slycot package, the following must be installed as
dependencies:

If you are installing Slycot from source, you will need a FORTRAN
compiler, such as gfortran, and BLAS/LAPACK libraries. Openblas is
also supported. The build system uses skbuild (scikit-buildsystem >=
0.8.1) and cmake.
- Python 2.7, 3.5+
- NumPy

On Debian derivatives you should be able to install OpenBLAS using::
If you are compiling and installing Slycot from source, you will need the
following dependencies:

sudo apt-get install libopenblas-dev
- 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)
- BLAS/LAPACK (e.g. OpenBLAS, ATLAS, MKL)

Additionally install cmake and install scikit-build with pip or conda.
There are a variety of ways to install these dependencies on different
operating systems. See the individual packages' documentation for options.

On Mac, you will first need to install the `developer tools
<https://developer.apple.com/xcode/>`_. You can then install gfortran using
`homebrew <http://brew.sh>`_ with::

brew install gcc
Installing
-----------

On Windows, the BLAS and LAPACK libraries can be obtained from:
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.

http://icl.cs.utk.edu/lapack-for-windows/libraries/VisualStudio/3.4.1/Dynamic-MINGW/Win32/
Using conda
~~~~~~~~~~~

Alternatively, use conda to install BLAS and LAPACK or OpenBLAS
Install Miniconda or Anaconda and then Slycot can be installed via the conda
package manager from the conda-forge channel with the following command::

Installing
-----------
conda install -c conda-forge slycot

Using pip
~~~~~~~~~

Slycot supports the pip packaging system. You must first have pip installed.

On Debian Linux based systems you can install pip with the command::

sudo apt-get install 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

Note that installing with pip may or may not require having the build
dependencies installed. There are some binary "wheels" available on PyPI,
so if those versions match with your system, you may be able to avoid
installing from source.

Using conda
~~~~~~~~~~~

Slycot can be installed via the conda package manager from the conda-forge
channel with the following command::

conda install -c conda-forge slycot

From source
~~~~~~~~~~~

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

cd /path/to/slycot_src/
python setup.py install

Where # is for commands that needs to be executed as root/administrator.
e.g. ``/path/to/slycot_src/``

If you need to specify a specific compiler, set the environment
variable FC before running the install::
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

You can also use conda to build and install slycot from source::
To build and install execute::

cd /path/to/slycot_src/
python setup.py 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-requisities).
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.
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::
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
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).

0 comments on commit 352270b

Please sign in to comment.