Mac OS (Apple M1 chip) installation

OpenMSIStream is not designed to run in Mac OS environments, but its programs work reliably on Mac at this time.

Create the Conda Environment

With Miniconda installed, create and activate a dedicated virtual environment for OpenMSI. In a terminal shell (or Anaconda Prompt in admin mode on Windows) type:

conda create -n openmsi python=3.9
conda activate openmsi

You’ll need to use the second command to “activate” the openmsi environment every time you open a Terminal window or Anaconda Prompt and want to work with OpenMSIStream.

Install libsodium

libsodium is a package used for the KafkaCrypto package that provides the end-to-end data encryption capability of OpenMSIStream. Since encryption is a built-in option for OpenMSIStream, you must install libsodium even if you don’t want to use encryption. Install the libsodium package through Miniconda using the shell command:

conda install -c anaconda libsodium

Install librdkafka

Working with MacOS requires a system-wide install of librdkafka. The easiest way to install librdkafka on Macs is using the package manager homebrew. The librdkafka installation instructions below were tested on a system running OS X Monterey; your mileage may vary.

Change the default shell to Bash:

chsh -s /bin/bash

Install Homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Add homebrew bin and sbin locations to your path:

export PATH=/opt/homebrew/bin:$PATH
export PATH=/opt/homebrew/sbin:$PATH

Use brew to install librdkafka:

brew install librdkafka

Install OpenMSIStream

You can install the OpenMSIStream code through PyPI:

pip install openmsistream

If you’d like to be able to make changes to the OpenMSIStream code without reinstalling, you can include the --editable flag in the pip install command. If you’d like to run the automatic code tests, build the documentation, or upload new releases to PyPI on your local system, you can install the optional dependencies needed with pip install openmsistream[test], pip install openmsistream[docs], or pip install openmsistream[dev] respectively, with or without the --editable flag. You can install all optional dependencies with pip install openmsistream[all].

This completes installation and will give you access to several new console commands to run OpenMSIStream applications, as well as any of the other modules in the openmsistream package.

If you like, you can check your installation by opening a python prompt and typing:

>>> import openmsistream

and if that line runs without any problems then the package was installed correctly.