Installation

Dependencies

pymanip requires FluidLab which it builds upon, as well as several third-party modules to communicate with instruments, either indirectly through FluidLab, or directly. Not all dependencies are declared in the requirements.txt file, because none of them are hard dependencies. It is possible to use pymanip or FluidLab with only a subset of these dependencies. Here is a dependence table, depending on what you want to do with the package. If a feature is available through FluidLab, the table indicates the FluidLab submodule that we are using.

pymanip module

fluidlab module

third-pary modules

pymanip.instruments

fluidlab.instruments

gpib (linux-gpib python bindings), pymodbus, pyserial, pyvisa

pymanip.daq.DAQmx

fluidlab.daq.daqmx

PyDAQmx

pymanip.daq.Scope

niScope

pymanip.aiodaq.daqmx

nidaqmx

pymanip.aiodaq.scope

niScope

pymanip.aioinstruments

fluidlab.instruments

Similar to pymanip.instruments

pymanip.video

AndorNeo, pymba, opencv, pyqtgraph (optional)

pymanip.asyncsession

aiohttp, aiohttp_jinja2, PyQt5 (optional)

pymanip.session

h5py

We also have our own bindings for some external libs, such as pymanip.video.pixelfly for PCO Library, pymanip.nisyscfg for National Instruments NISysCfg library.

Download and install

We recommand to install FluidLab and pymanip from the repositories, i.e. FluidLab from Heptapod and pymanip from GitHub, and to use the -e option of pip install to easily pull updates from the repositories:

$ hg clone https://foss.heptapod.net/fluiddyn/fluidlab
$ cd fluidlab
$ python -m pip install -e .
$ cd ..
$ git clone https://github.com/jsalort/pymanip.git
$ cd pymanip
$ python -m pip install -e .

However, it is also possible to install from PyPI:

$ python -m pip install fluidlab pymanip

Full installation with conda

Of course, it is possible to install the module, and its dependencies any way you like. For the record, I write here the procedure that we have been using in our lab for all our experimental room computers, using Anaconda. I am not advocating that it is better than another method. It installs many packages that are not dependencies of pymanip or fluidlab, but that we use regularly. We install as many packages as possible from conda, so that pip installs as little dependencies as possible. We also use black, flake8 and pre-commit hooks for the git repository.

Our base environment is setup like this:

$ conda create -n py37 python=3.7
$ conda activate py37
$ conda install conda
$ conda install jupyterlab jupyter_console widgetsnbextension qtconsole spyder numpy matplotlib scipy
$ conda install h5py scikit-image opencv
$ conda install git
$ conda install cython numba aiohttp flake8 filelock flask markdown
$ python -m pip install --upgrade pip
$ python -m pip install PyHamcrest
$ python -m pip install clint pint aiohttp_jinja2
$ python -m pip install pyserial pydaqmx pyvisa pyvisa-py
$ python -m pip install pyqtgraph
$ python -m pip install llc black pre-commit
$ python -m pip install importlib_resources

Then fluiddyn, fluidimage, fluidlab and pymanip are installed from the repository, as indicated in the previous section. For the computer with video acquisition, the third-party library must first be installed, and then the corresponding third-party python package, as indicated in the table.