Installation#

Install pyCRO#

For a clean installation, first create a new environment named env_pyCRO via mamba (see how to install mamba environment):

mamba create -n env_pyCRO python=3.12   # supports Python 3.12 and onwards
mamba activate env_pyCRO

Then install required dependencies via mamba:

mamba install -c conda-forge numpy xarray statsmodels netcdf4 matplotlib

Once the above dependencies are installed, simply install pyCRO via pip:

pip install pyCRO

You are now ready to import pyCRO in Python:

from pyCRO import *

Install the mamba environment#

You may skip this step if your mamba environment has been installed already.

Step 1: Download the installation script for Miniconda3#

macOS (Intel)#

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh

macOS (Apple Silicon)#

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh

Linux#

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

Step 2: Install Miniconda3#

chmod +x Miniconda3-latest-*.sh && ./Miniconda3-latest-*.sh

During the installation, a path <base-path> needs to be specified as the base location of the Python environment. After the installation is done, add the following lines into your shell environment (e.g., ~/.bashrc or ~/.zshrc) to enable the mamba package manager (remember to replace <base-path> with your actual installation path):

export PATH="<base-path>/bin:$PATH"
. <base-path>/etc/profile.d/conda.sh

Step 3: Test your Installation#

source ~/.bashrc  # assume you are using Bash shell
which python      # should return a path under <base-path>
which mamba       # should return a path under <base-path>