File: install.rst

package info (click to toggle)
silx 2.2.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 31,652 kB
  • sloc: python: 119,829; ansic: 5,062; lisp: 4,454; cpp: 883; sh: 286; makefile: 90; xml: 46
file content (169 lines) | stat: -rw-r--r-- 4,527 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
.. _Installation:

Installation
============

*silx* runs on Linux, MacOS and Windows and supports Python version 3.8 to 3.12.

.. _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 <https://packages.debian.org/search?searchon=names&keywords=silx>`_
and `Ubuntu <https://packages.ubuntu.com/search?keywords=silx&searchon=names&suite=all&section=all>`_.

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) <https://aur.archlinux.org/packages/python-silx>`_.


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 can be set through environment variables, for example:

.. code-block::

   SILX_WITH_OPENMP=False pip install silx --no-binary silx


Build options
+++++++++++++

.. list-table::
   :widths: 1 4
   :header-rows: 1

   * - Environment variable
     - Description
   * - ``SILX_WITH_OPENMP``
     - Whether or not to compile Cython code with OpenMP support (default: ``True`` except on macOS where it is ``False``)
   * - ``SILX_FORCE_CYTHON``
     - Whether or not to force re-generating the C/C++ source code from Cython files (default: ``False``).
   * - ``SPECFILE_USE_GNU_SOURCE``
     - Whether or not to use a cleaner locale independent implementation of :mod:`silx.io.specfile` by using `_GNU_SOURCE=1`
       (default: ``False``; POSIX operating system only).
   * - ``SILX_FULL_INSTALL_REQUIRES``
     - Set it to put all dependencies as ``install_requires`` (For packaging purpose).
   * - ``SILX_INSTALL_REQUIRES_STRIP``
     - Comma-separated list of package names to remove from ``install_requires`` (For packaging purpose).
.. note:: Boolean options are passed as ``True`` or ``False``.


.. _dependencies:

Dependencies
------------

The mandatory dependencies are:

- `fabio <https://github.com/silx-kit/fabio>`_
- `h5py <http://docs.h5py.org/en/latest/build.html>`_
- `numpy <http://www.numpy.org/>`_
- `packaging <https://pypi.org/project/packaging/>`_

The GUI widgets depend on the following extra packages:

* A Qt binding: either `PyQt5 <https://riverbankcomputing.com/software/pyqt/intro>`_ (>= 5.9),
  `PySide6 <https://pypi.org/project/PySide6/>`_ (>= 6.4) or
  `PyQt6 <https://pypi.org/project/PyQt6/>`_ (>= 6.3)
* `matplotlib <http://matplotlib.org/>`_
* `PyOpenGL <http://pyopengl.sourceforge.net/>`_
* `qtconsole <https://pypi.org/project/qtconsole>`_
  for the ``silx.gui.console`` widget.
* `python-dateutil <https://pypi.org/project/python-dateutil/>`_

*silx.opencl* further depends on OpenCL and the following packages too :

* `pyopencl <https://mathema.tician.de/software/pyopencl/>`_
* `Mako <http://www.makotemplates.org/>`_

List of dependencies with minimum required versions:

.. include:: ../../requirements.txt
   :literal:

Build dependencies
++++++++++++++++++

In addition to run-time dependencies, building *silx* requires a C/C++ compiler and `cython <http://cython.org>`_.