install.rst 2.48 KB
Newer Older
Damien Naudet's avatar
Damien Naudet committed
1
2
3
4

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

Thomas Vincent's avatar
Thomas Vincent committed
5
*X-SOCS* supports `Python <https://www.python.org/>`_ versions >= 3.4 (recommended) and 2.7.
Damien Naudet's avatar
Damien Naudet committed
6

Thomas Vincent's avatar
Thomas Vincent committed
7
8
9
10
11
Binary wheels of X-SOCS are available for Linux and Windows (for Python >= 3.6):

- Latest release in *X-SOCS* `package repository <https://gitlab.esrf.fr/kmap/xsocs/-/packages>`_.
- Development version in *X-SOCS* `wheelhouse <https://kmap.gitlab-pages.esrf.fr/xsocs/wheels/>`_.

12
13
14

To install *X-SOCS* with minimal dependency (to use from scripts)::

Thomas Vincent's avatar
Thomas Vincent committed
15
    pip install --extra-index-url https://gitlab.esrf.fr/api/v4/projects/408/packages/pypi/simple xsocs [--user]
16
17
18

or with graphical user interface dependencies::

Thomas Vincent's avatar
Thomas Vincent committed
19
20
21
22
    pip install --extra-index-url https://gitlab.esrf.fr/api/v4/projects/408/packages/pypi/simple xsocs[gui] [--user]

To install the current development version::

23
24
25
26
    pip install --pre --find-links https://kmap.gitlab-pages.esrf.fr/xsocs/wheels/ xsocs[gui] [--user]

.. note::
   The ``--user`` optional argument installs X-SOCS for the current user only.
Damien Naudet's avatar
Damien Naudet committed
27
28
29
30
31
32

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

The dependencies of *X-SOCS* are:

Thomas Vincent's avatar
Thomas Vincent committed
33
34
35
* `Python <https://www.python.org/>`_ >=3.4 or 2.7 (Note: The Graphical user interface is only tested with python3).
* `numpy <http://www.numpy.org>`_
* `h5py <http://www.h5py.org/>`_
36
37
* `fabio <https://pypi.org/project/fabio/>`_
* `silx <https://pypi.org/project/silx>`_
Thomas Vincent's avatar
Thomas Vincent committed
38
39
40
41
42
* `xrayutilities <https://xrayutilities.sourceforge.io/>`_
* `scipy <https://pypi.python.org/pypi/scipy>`_
* `PyOpenGL <http://pyopengl.sourceforge.net/>`_
* `matplotlib <https://matplotlib.org/>`_
* `PyQt5 <https://riverbankcomputing.com/software/pyqt/intro>`_
43
* `setuptools <https://pypi.org/project/setuptools/>`_
Thomas Vincent's avatar
Thomas Vincent committed
44
45

In addition, OpenGL 2.1 is required for the 3D view of the QSpace.
Damien Naudet's avatar
Damien Naudet committed
46
47
48
49

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

Thomas Vincent's avatar
Thomas Vincent committed
50
In addition to run-time dependencies, building *X-SOCS* requires:
Damien Naudet's avatar
Damien Naudet committed
51

Thomas Vincent's avatar
Thomas Vincent committed
52
53
* a C/C++ compiler
* `cython <http://cython.org/>`_ (>=0.21).
Damien Naudet's avatar
Damien Naudet committed
54
55
56
57
58
59
60
61
62

Installing from source
----------------------

Building *X-SOCS* from the source requires some `Build dependencies`_.

Building from source
++++++++++++++++++++

Thomas Vincent's avatar
Thomas Vincent committed
63
Clone the source `repository <https://gitlab.esrf.fr/kmap/xsocs.git>`_::
Damien Naudet's avatar
Damien Naudet committed
64
65
66

    git clone https://gitlab.esrf.fr/kmap/xsocs.git

Thomas Vincent's avatar
Thomas Vincent committed
67
68
69
Or download the source as a `zip file <https://gitlab.esrf.fr/kmap/xsocs/-/archive/master/xsocs-master.zip>`_ and unzip it.

Then go into the xsocs directory::
Damien Naudet's avatar
Damien Naudet committed
70
71
72

    cd xsocs

Thomas Vincent's avatar
Thomas Vincent committed
73
74
75
And install xsocs either with minimal dependency (to use from scripts)::

    pip install . [--user]
Damien Naudet's avatar
Damien Naudet committed
76

Thomas Vincent's avatar
Thomas Vincent committed
77
or with all graphical user interface dependencies::
Damien Naudet's avatar
Damien Naudet committed
78

Thomas Vincent's avatar
Thomas Vincent committed
79
    pip install .[gui] [--user]
Damien Naudet's avatar
Damien Naudet committed
80