Build and Install¶
Install binary packages¶
We provide Conda binary packages for some cameras. This is, by far, the easiest way to get started with LImA! For instance:
Install first lastest miniconda3 (https://docs.conda.io/en/latest/miniconda.html)
Install mamba package in your “base” environment to speed up your future installations, the default conda installer is very slow, so we prefer to use mamba:
- ::
conda install mamba
Install now the Lima camera package (e.g basler) at the same time you create the new environment for your Lima installation:
- ::
mamba create -n basler -c conda-forge -c esrf-bcu lima-camera-basler
would install a fully loaded Lima and all its dependencies with the Basler camera plugin and SDK. The camera comes as a python module but is also C++ development package that includes header files and CMake package config files.
If you need to run the Python Tango device server you should install the Tango camera package:
mamba create -n basler -c conda-forge -c esrf-bcu lima-camera-basler-tango
Note
The runtime libraries of the camera’s SDK are provided as well but some cameras requires drivers or specific setups than needs to be installed manually.
Build from source¶
First, you need to Get the Source. Two methods are provided to build LImA from source:
Using scripts¶
The install
scripts will run CMake to compile and/or install.
It accepts input arguments (see below) but it also uses a configuration file scripts/config.txt
. Feel free to update this file for setting a permanent configuration for your own installation.
For Linux:
[sudo] install.sh
[--git]
[--install-prefix=<desired installation path>]
[--install-python-prefix=<desired python installation path>]
[options]
For Windows:
install.bat
[--install-prefix=<desired installation path>]
[--install-python-prefix=<desired python installation path>]
[options]
The --git
(Linux only) option can be used to clone the required submodules as a prerequisite. Otherwise you should install the submodules manually with git commands, for instance:
$ git submodule init third-party/Processlib
$ git submodule init camera/basler
$ git submodule init applications/tango/python
$ git submodule update
Options are <camera-name> <saving-format> python pytango-server
:
<camera-name>
can be a combination of any of the following options:
andor|andor3|basler|prosilica|adsc|mythen3|ueye|xh|xspress3|ultra|
xpad|mythen|pco|marccd|pointgrey|imxpad|dexela|merlin|v4l2|
eiger|pixirad|hexitec|aviex|roperscientific|rayonixhs|espia|maxipix|frelon
<saving-format>
can be a combination of any of the following options:
cbf|nxs|fits|edfgz|edflz4|tiff|hdf5
python
will install the python module
pytango-server
will install the PyTango server
For example, to install the Basler camera, use the TIFF output format, the python binding and the TANGO server, one would run:
$ sudo install.sh --git --install-prefix=./install --install-python-prefix=./install/python tiff basler python pytango-server
Using CMake¶
Install first the project submodules:
git submodule init third-party/Processlib
git submodule init camera/basler
git submodule init applications/tango/python
git submodule update
Run cmake
in the build directory:
mkdir build
cd build
cmake ..
[-G "Visual Studio 15 2017 Win64" | -G "Visual Studio 15 2017" | -G "Unix Makefiles"]
[-DCMAKE_INSTALL_PREFIX=<desired installation path>]
[-DPYTHON_SITE_PACKAGES_DIR=<desired python installation path>]
-DLIMA_ENABLE_TIFF=true
-DLIMACAMERA_BASLER=true
-DLIMA_ENABLE_PYTANGO_SERVER=true
-DLIMA_ENABLE_PYTHON=true
Then compile and install:
cmake --build
sudo cmake --build --target install
Environment Setup¶
Warning
If you are using Conda, we advice against setting any environment variables that might affect the Conda environment (e.g. PATH
, PYTHONPATH
)as this one of the most common source of troubles.
If the install path for libraries and python modules are not the default, you need to update your environment variables as follow:
For Linux:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<my-custom-install-dir>/Lima/lib
export PYTHONPATH=$PYTHONPATH:<my-custom-install-dir>
For Windows:
set PATH=%PATH%;<my-custom-install-dir>\Lima\lib
set PYTHONPATH=%PYTHONPATH%;<my-custom-install-dir>
or update the system wide variables PATH
for the libraries and PYTHONPATH
for python.