sisl is easy to install using any of your preferred methods.
Python 3.6 or above
numpy (1.13 or later)
scipy (0.18 or later)
pyparsing (1.5.7 or later)
A C- and fortran-compiler
pytest (for running the test suite)
pathos (for parallel BrillouinZone calculations)
tqdm (for displaying progress-bars)
xarray (for advanced table data structures in certain methods)
sisl implements certain methods in Cython which speeds up the execution. Cython is required if one wishes to re-generate the C-sources with a different Cython version. Note that this is not a necessary step and should typically only be considered by developers of Cython modules.
Installing sisl using PyPi can be done using
pip3 install sisl # or pip3 install sisl[analysis]
pip3 will automatically install the required dependencies. The optional dependencies
will be used if later installed.
The latter installation call also installs
xarray which are part of
extended analysis methods. These are not required and may be installed later if their usage
When wanting to pass options to
pip3 simply use the following
pip3 install --install-option="--compiler=intelem" --install-option="--fcompiler-intelem" sisl
note that options are accummulated.
Installing sisl using conda can be done by
conda config --add channels conda-forge conda install sisl
To find more information about the conda-forge installation please see here.
sisl may be installed using the regular setup.py script.
Ensure the required dependencies are installed before proceeding with the
manual installation (without numpy installed a spurious error message will
appear). The dependencies may be installed using this
pip3 install -r requirements.txt
python3 setup.py install --prefix=<prefix>
sisl on Windows one will require a specification of
the compilers used. Typically one may do
python3 setup.py install --prefix=<prefix> --fcompiler=gfortran --compiler=mingw32
setuptools does not intercept the flags in the build process.
To remedy this please ensure
%HOME%\pydistutils.cfg contains the build options:
[build] compiler = mingw32 fcompiler = gfortran
Testing your installation¶
After installation (by either of the above listed methods) you are encouraged to perform the shipped tests to ensure everything got installed correctly.
Note that pytest needs to be installed to run the tests. Testing the installation may be done by:
pytest --pyargs sisl
The above will run the default test-suite which covers most of the
Additional tests may be runned by cloning the sisl-files
and setting the environment variable SISL_FILES_TESTS as the path to the repository.
A basic procedure would be:
git clone https://github.com/zerothi/sisl-files.git SISL_FILES_TESTS=$(pwd)/sisl-files pytest --pyargs sisl
To install the development version using
pip3 you may use the URL command:
pip3 install git+https://github.com/zerothi/sisl.git
Otherwise follow the manual installation by cloning the git repository.
Remark that the
git+https protocol is buggy (as of pip v19.0.3) because you cannot pass compiler
setup.py. If you want to install the development version with e.g.
the Intel compilers you should do:
git clone git+https://github.com/zerothi/sisl.git cd sisl pip3 install --global-option="build" --global-option="--compiler=intelem" --global-option="--fcompiler=intelem" .
which will pass the correct options to the build system.