Complete installation and verification procedure

Purpose. This guide installs Micromamba on macOS, creates the cpc_id_env Python environment, installs TensorFlow, and verifies the core AI and scientific Python libraries. WSL is not required on a Mac.

1 Open Terminal

Press Command and Space, type Terminal, and open the Terminal application.

2 Install Micromamba

Copy the complete command below into Terminal and press Return.

curl -L https://micro.mamba.pm/install.sh | bash

Installation responses

Prompt Response
Installation responses Press Enter
Init shell zsh [Y/n] Type Y, then press Enter
Configure conda forge [Y/n] Type Y, then press Enter
Prefix location [~/micromamba] Press Enter - do not type Y

Important: Do not type the Terminal prompt symbol % as part of any command.

3 Activate and Check Micromamba

Load the new shell configuration, then confirm that Micromamba returns a version number.

source ~/.zshrc
micromamba --version

4 Create the AI Environment

Create the Python 3.10 environment and install the scientific, geospatial, plotting, and machine learning packages.

micromamba create -n cpc_id_env -c conda-forge python=3.10 numpy pandas geopandas shapely jupyter scipy matplotlib scikit-learn netcdf4 h5py cartopy xarray seaborn pip -y

5 Activate the Environment

Activate the new environment. The Terminal prompt should begin with (cpc_id_env).

micromamba activate cpc_id_env

6 Install TensorFlow

Install TensorFlow inside the activated cpc_id_env environment.

python -m pip install tensorflow

7 Verify the AI Libraries

Run this single command after TensorFlow finishes installing.

python -c "import numpy as np; import pandas as pd; from sklearn.preprocessing import MinMaxScaler; from keras.models import Sequential; from keras.layers import LSTM, Dense; print('Everything works!')"

Successful result. If Terminal prints Everything works!, the Mac AI environment is ready.

Future Use

Each time you open a new Terminal window, activate the environment before running the AI code.

micromamba activate cpc_id_env

Correction for an Accidental Y Prefix

If Y was entered at the Prefix location prompt, reset the root prefix to the standard micromamba folder and reload the shell.

micromamba shell init -s zsh -r ~/micromamba
source ~/.zshrc