Package Installation#

This page describes how to install opinf locally.

Important

Like most Python packages, opinf has a few software dependencies. To avoid conflicts with other installed packages, we recommend installing opinf within a new conda environment (recommended) or virtual Python environment .

# Make a fresh conda environment and install Python 3.11.
conda create -n opinf python=3.12

Be sure to activate the environment before using pip or other installation tools.

# Activate the conda environment (updates the PATH).
$ conda activate opinf

# Verify python is now linked to the conda environment.
(opinf) $ which python3
/path/to/your/conda/envs/opinf/bin/python3
$ python3 --version
Python 3.12.3

Tip

To check if the package is already installed in the current Python environment, run the following in the command line.

(opinf) $ python3 -m pip freeze | grep opinf
9:opinf==0.5.5

No output means the package was not found.

Latest Commit to Main Branch#

The following command installs the latest version from the main branch, which may or may not be associated with an official release. This requires git.

$ conda activate opinf

# Install with git + SSH credentials (recommended).
(opinf) $ python3 -m pip install git+ssh://git@github.com/Willcox-Research-Group/rom-operator-inference-Python3.git

# Install with git + HTTPS.
(opinf) $ python3 -m pip install git+https://github.com/Willcox-Research-Group/rom-operator-inference-Python3.git

Source Code#

The final option is to download the entire repository (including tests, documentation, etc.) and install the package from source. This also requires git and is the first step for contributing. See the Developer Guide if you are interested in contributing.

$ git clone git@github.com:Willcox-Research-Group/rom-operator-inference-Python3.git OpInf
$ conda activate opinf
(opinf) $ python3 -m pip install OpInf