forked from pyepics/pyepics
-
Notifications
You must be signed in to change notification settings - Fork 2
/
INSTALL
61 lines (43 loc) · 2.51 KB
/
INSTALL
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
Installation instructions for PyEpics3
=======================================
To install the epics module, use
pip install pyepics
Or download the source kit from PyPI or Github, unpack that, and use
pip install .
PyEpics requires Python 3.8 or higher.
Epics CA Shared Libraries, and using alternate versions of these
=====================================================================
Pyepics needs to find and load shared object libraries (DLLs) for Epics Channel
Access (libca and libCom) at runtime. Recently-compiled versions of these
shared object libraries are included with this distribution for Windows64,
MacOS (both x86_64 and arm64), Linux64, and LinuxArm and will be installed into
the pyepics installation folder and used by default. These are located under
the epics/clibs folder of the source folder. Legacy DLLs for 32-bit Windows
and Linux are also included, but should be used with caution.
By providing and using these shared libraries, pyepics will work "out of the
box" on most OSes and systems without any other Epics libraries installed.
There may be some OSes used or some situations for which you will want to use
different versions of libca and libCom, especially on systems already using
Epics for other applications. One notable example is if you are using
pyepics within a Python program or application that has already loaded a
version of libca, as a single process can load only one version of a shared
library. If you are using the `pcaspy` library or running a python script
that loads pyepics from within an epics IOC, you will need to ensure that all
libraries loading libca load exactly the same version.
To accommodate this situation, pyepics loads libca as late as possible and
allows you to set the PYEPICS_LIBCA environmental variable, either globally
for the shell running the application or within the python program itself
before any real Channel Access is done -- this can be set after importing the
pyepics module. So, for example, you could do
>>> import epics
>>> import os
>>> os.environ['PYEPCICS_LIBCA']='/usr/local/epics/base-7.0.4/lib/linux-x86_64/libca.so'
>>> print(epics.caget('XXX:m1'))
-0.2500
You can also test which exact 'libca' was used. For the example above
>>> print(epics.ca.find_libca())
'/usr/local/epics/base-7.0.4/lib/linux-x86_64/libca.so'
whereas by default this will point to something like
'../site-packages/pyepics-3.4.3-py3.8.egg/epics/clibs/linux64/libca.so'
Matt Newville <newville@cars.uchicago.edu>
Last Update: 2024-June-12