File: getting_started.rst

package info (click to toggle)
taurus 4.5.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 99,944 kB
  • sloc: python: 52,365; sh: 21; makefile: 12
file content (179 lines) | stat: -rw-r--r-- 5,923 bytes parent folder | download
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
170
171
172
173
174
175
176
177
178
179

.. _getting_started:

===============
Getting started
===============

.. _installing:

Installing
----------

Installing with pip (platform-independent)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Taurus can be installed using pip. The following command will automatically
download and install the latest release of Taurus (see pip --help for options)::

       pip install taurus

You can test the installation by running::

       python -c "import taurus; print taurus.Release.version"

Note: pip is already included in python>2.7.9

Note: some "extra" features of taurus have additional dependencies_.

Installing from sources manually (platform-independent)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You may alternatively install from a downloaded release package:

#. Download the latest sources of taurus from http://pypi.python.org/pypi/taurus
#. Extract the downloaded source into a temporary directory and change to it
#. run::

       pip install .

#. test the installation::

       python -c "import taurus; print taurus.Release.version"

Note: some "extra" features of taurus have additional dependencies_.

Linux (Debian-based)
~~~~~~~~~~~~~~~~~~~~

Since v3.0, Taurus is part of the official repositories of Debian (and Ubuntu
and other Debian-based distros). You can install it and all its dependencies by
doing (as root)::

       aptitude install python-taurus

(see more detailed instructions in `this step-by-step howto
<https://sourceforge.net/p/sardana/wiki/Howto-SardanaFromScratch/>`__)


Windows
~~~~~~~

#. Install the `Python(x,y)`_ bundle (alternatively, you could install Python,
   PyQt_, PLY_, and other dependencies_ independently, but `Python(x,y)`_
   will save you much worries about versions).
#. Download the latest Taurus windows binary from http://pypi.python.org/pypi/taurus
#. Run the installation executable
#. test the installation::

       C:\Python27\python -c "import taurus; print taurus.Release.version"


Working from Git source directly (in develop mode)
--------------------------------------------------

If you intend to do changes to Taurus itself, or want to try the latest
developments, it is convenient to work directly from the git source in
"develop" (aka "editable") mode, so that you do not need to re-install
on each change.

You can clone taurus from our main git repository::

    git clone https://github.com/taurus-org/taurus.git taurus

Then, to work in develop mode, just do::

    pip install -e ./taurus


.. _dependencies:

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

Strictly speaking, Taurus only depends on numpy_, pint_ and future_
but that will leave out most of the features normally
expected of Taurus (which are considered "extras"). For example:

- Interacting with a Tango controls system requires PyTango_.

- Interacting with an Epics controls system requires pyepics_.

- Using the taurus Qt_ widgets, requires either PyQt_ (v4 or v5)
  or PySide_ (v1 or v2). Note that most development and testing of
  is done with PyQt4 and PyQt5, so many features may not be
  regularly tested with PySide and PySide2.

- The :mod:`taurus.qt.qtgui.plot` module requires PyQwt_, which is
  only available when using PyQt4 and python2. As an alternative
  that supports both python2 and python3 and all the Qt bindings,
  refer to the taurus_pyqtgraph_ plugin.

- The image widgets require the guiqwt_ library.

- The JDraw synoptics widgets require the PLY_ package.

- The NeXus browser widget requires PyMca5_.

- The TaurusEditor widget requires spyder_.

- The TaurusGui module requires lxml_.


For a complete list of "extra" features and their corresponding
requirements, execute the following command::

    python -c 'import taurus; taurus.check_dependencies()'


How you install the required dependencies depends on your preferred
installation method:

- For GNU/Linux, it is in general better to install the dependencies from
  your distribution repositories if available.

- For Windows users: many of these dependencies are already satisfied
  by installing the `Python(x,y)`_ bundle. Also, most can be installed
  from PyPI_ (e.g. using pip). For some versions, PyPI may not provide
  pre-built windows binaries, so pip may try to compile from sources,
  which takes long and may not succeed without some further work. In
  those cases, one may use windows binaries from other versions and/or
  wheel packages from the Silx_WheelHouse_.

- In general, you can use pip to install dependencies for a given
  extra feature (if they are in PyPI or in one of your configured
  indexes). Use::

      pip install taurus[NAME_OF_EXTRA]

- The Conda_ package management system may also be used to install
  most of the required dependencies.

- The `taurus-test Docker container`_ provides a Docker container (based
  on Debian) with all the dependencies pre-installed (including Tango and
  Epics running environments) on which you can install taurus straight
  away.


.. _numpy: http://numpy.org/
.. _pint: http://pint.readthedocs.org/
.. _future: https://python-future.org/
.. _PLY: http://www.dabeaz.com/ply/
.. _Python(x,y): http://python-xy.github.io/
.. _Tango: http://www.tango-controls.org/
.. _PyTango: http://pytango.readthedocs.io
.. _Qt: http://qt.nokia.com/products/
.. _PyQt: http://www.riverbankcomputing.co.uk/software/pyqt/
.. _PySide: https://wiki.qt.io/Qt_for_Python
.. _PyQwt: http://pyqwt.sourceforge.net/
.. _taurus_pyqtgraph: https://github.com/taurus-org/taurus_pyqtgraph
.. _guiqwt: https://pypi.python.org/pypi/guiqtw
.. _IPython: http://ipython.org
.. _PyMca5: http://pymca.sourceforge.net/
.. _pyepics: http://pypi.python.org/pypi/pyepics
.. _spyder: http://pythonhosted.org/spyder
.. _lxml: http://lxml.de
.. _Silx_WheelHouse: http://www.silx.org/pub/wheelhouse/
.. _PyPI: http://pypi.python.org/pypi
.. _Conda: http://conda.io/docs/
.. _taurus-test Docker container: http://hub.docker.com/r/cpascual/taurus-test/