Install#
Installing pymmcore-plus#
pymmcore-plus
can be installed with pip:
pip install pymmcore-plus
# or, add the [cli] extra if you wish to use the `mmcore` command line tool:
pip install "pymmcore-plus[cli]"
or with conda:
conda install -c conda-forge pymmcore-plus
Installing Micro-Manager Device Adapters#
Just like the underlying pymmcore
library,
pymmcore-plus
also relies on the device adapters and C++ core provided by
mmCoreAndDevices.
They can be installed in two ways:
-
Use the
mmcore
command line toolIf you've installed with
pip install "pymmcore-plus[cli]"
, this library provides a quick way to install the latest version of micro-manager:mmcore install
This will download the latest release of micro-manager and, by default, place it in a
pymmcore-plus\mm
folder in the user's data directory (e.g.C:\Users\UserName\AppData\Local\pymmcore-plus\mm
). If you would like to modify the location of the installation, or the release of micro-manager to install, you can use the--dest
and--release
flags respectively.For more information on the
install
command, run:mmcore install --help
To explore all the
mmcore
command line tool functionalities, run:mmcore --help
-
Download manually from micro-manager.org
Go to the micro-manager downloads page and download the latest release for your Operating System.
Critical
The device interface version MUST match between pymmcore
and the
Micro-Manager device adapters.
The device interface version of a given pymmcore
version is the
fourth part in the version number (e.g. v11.1.1.71.0), and can also be
identified with the following command:
mmcore --version
or, if you didn't install with the cli
extra:
python -c "print(__import__('pymmcore').CMMCore().getAPIVersionInfo())"
The device interface version of a given Micro-Manager installation can be viewed
in Help > About Micro-Manager. Or you can look at the MMDevice.h
file for
the corresponding date, roughly
here
Show the currently used Micro-Manager installation#
To see which micro-manager installation pymmcore-plus
is using, you
can run:
mmcore list
or, if you didn't install with the cli
extra, you can use
find_micromanager
:
python -c "from pymmcore_plus import find_micromanager; print(find_micromanager())"
Set the active Micro-Manager installation#
By default, pymmcore-plus
will look for a Micro-Manager
folder in the
default install location. On Windows this is C:\Program Files\
, on macOS it is
/Applications/
and on Linux it is /usr/local/lib/
. To override these default
device adapter search path, set the MICROMANAGER_PATH
environment variable
export MICROMANAGER_PATH=/path/to/installation
If you want to permanently set the Micro-Manager installation path that
pymmcore-plus
uses, you can use the mmcore use
command:
mmcore use <some path or pattern>
... where <some path or pattern>
is either a path to an existing directory
(containing micro-manager device adapters) or a pattern to match against
directories returned by find_micromanager
.
Alternatively, you can use the
use_micromanager
function, passing either
a path to an existing directory, or a pattern to match against directories
returned by find_micromanager
:
python -c "from pymmcore_plus import use_micromanager; use_micromanager(path=..., pattern=...)"
On Linux#
On a linux based system the easiest approach is to just install the C++ core of micromanager, mmCoreAndDevices. To do that follow the build instructions in the micro-manager repo.