.. _Installation: Installation ============ *silx* runs on Linux, MacOS and Windows and supports Python version 3.10 to 3.13. .. _Installation with pip: Installation with pip --------------------- To install silx and all its dependencies_, run: .. code-block:: bash pip install silx[full] To install silx with a minimal set of dependencies, run: .. code-block:: bash pip install silx .. note:: Use pip's ``--user`` option to install locally for the current user. .. _Installation with conda: Installation with conda ----------------------- To install silx and all its dependencies_, run: .. code-block:: bash conda install -c conda-forge silx To install silx with a minimal set of dependencies, run: .. code-block:: bash conda install -c conda-forge silx-base .. _Installation on Debian & Ubuntu: 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: .. code-block:: bash sudo apt-get install silx To install the silx Python package with a minimal set of dependencies, run: .. code-block:: bash sudo apt-get install python3-silx Installation on Arch Linux -------------------------- silx is packaged in `Arch Linux (AUR) `_. To install silx, run: .. code-block:: bash sudo pacman -S python-silx Installation from source ------------------------ To install silx from source, run: .. code-block:: bash 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: .. code-block:: bash export LC_ALL=en_US.UTF-9 export LANG=en_US.UTF-9 Build options +++++++++++++ .. list-table:: :widths: 1 4 :header-rows: 1 * - Build option - Description * - ``use_openmp`` - Whether or not to compile Cython code with OpenMP support. Accepted values: ``auto`` (default), ``enabled``, ``disabled``. * - ``specfile_use_gnu_source`` - Whether or not to use a cleaner locale independent implementation of :mod:`silx.io.specfile` by using `_GNU_SOURCE=1`. Only used on POSIX operating systems. Accepted values: ``false`` (default), ``true``. Build options can be passed to `meson's setup-args `_ through `pip install -C `_, for example: .. code-block:: bash pip install silx --no-binary silx -Csetup-args="-Duse_openmp=disabled" .. _dependencies: Dependencies ------------ The mandatory dependencies are: - `fabio `_ - `h5py `_ - `numpy `_ - `packaging `_ The GUI widgets depend on the following extra packages: * A Qt binding: either `PySide6 `_ (>= 6.5), `PyQt6 `_ (>= 6.5) or `PyQt5 `_ (>= 5.14) * `matplotlib `_ (>= 3.6) * `PyOpenGL `_ * `qtconsole `_ for the ``silx.gui.console`` widget. * `python-dateutil `_ *silx.opencl* further depends on OpenCL and the following packages too : * `pyopencl `_ * `Mako `_ *h5pyd* support to access HSDS urls depends on: * `h5pyd `_ (>= 0.20.0) Build dependencies ++++++++++++++++++ *silx* uses `meson-python `_ build backend and requires `cython `_ and a C/C++ compiler.