Installation#
silx runs on Linux, MacOS and Windows and supports Python version 3.8 to 3.12.
Installation with pip#
To install silx and all its dependencies, run:
pip install silx[full]
To install silx with a minimal set of dependencies, run:
pip install silx
Note
Use pip’s --user
option to install locally for the current user.
Installation with conda#
To install silx and all its dependencies, run:
conda install -c conda-forge silx
To install silx with a minimal set of dependencies, run:
conda install -c conda-forge silx-base
Installation on Debian & Ubuntu#
silx is packaged in Debian and Ubuntu.
To install silx with the executable (silx view, silx convert, …) and all its dependencies, run:
sudo apt-get install silx
To install the silx Python package with a minimal set of dependencies, run:
sudo apt-get install python3-silx
Installation on Arch Linux#
silx is packaged in Arch Linux (AUR).
To install silx, run:
sudo pacman -S python-silx
Installation from source#
To install silx from source, run:
pip install silx --no-binary silx
Warning
On MacOS, you might get the following error:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1335: ordinal not in range(128)
This is related to the two environment variables LC_ALL and LANG not being defined (or wrongly defined to UTF-9). To set the environment variables, run:
export LC_ALL=en_US.UTF-9
export LANG=en_US.UTF-9
Build options can be set through environment variables, for example:
SILX_WITH_OPENMP=False pip install silx --no-binary silx
Build options#
Environment variable |
Description |
---|---|
|
Whether or not to compile Cython code with OpenMP support (default: |
|
Whether or not to force re-generating the C/C++ source code from Cython files (default: |
|
Whether or not to use a cleaner locale independent implementation of |
|
Set it to put all dependencies as |
|
Comma-separated list of package names to remove from |
Note
Boolean options are passed as True
or False
.
Dependencies#
The mandatory dependencies are:
The GUI widgets depend on the following extra packages:
A Qt binding: either PyQt5 (>= 5.9), PySide6 (>= 6.4) or PyQt6 (>= 6.3)
qtconsole for the
silx.gui.console
widget.
silx.opencl further depends on OpenCL and the following packages too :
List of dependencies with minimum required versions:
# List all dependencies of silx
# Requires pip >= 8.0
--trusted-host www.silx.org
--find-links http://www.silx.org/pub/wheelhouse/
--only-binary numpy,h5py,scipy,PyQt5,PySide6,PyQt6
# Required dependencies
# From pyproject.toml
wheel
setuptools
numpy >= 1.14.5
Cython >= 0.21.1
# From setup.py install_requires
packaging
h5py
fabio >= 0.9
importlib_resources; python_version < '3.9'
# Extra dependencies (from setup.py extra_requires 'full' target)
pyopencl; platform_machine in "i386, x86_64, AMD64" # For silx.opencl
Mako # For pyopencl reduction
qtconsole # For silx.gui.console
matplotlib >= 3.1.0 # For silx.gui.plot
PyOpenGL # For silx.gui.plot3d
python-dateutil # For silx.gui.plot
scipy # For silx.math.fit demo, silx.image.sift demo, silx.image.sift.test
pooch # For scipy.datasets.ascent
Pillow # For silx.opencl.image.test
pint # For silx.io.dictdump
PyQt5 # PySide6, PyQt6>=6.3 # For silx.gui
Build dependencies#
In addition to run-time dependencies, building silx requires a C/C++ compiler and cython.