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.
Press Command and Space, type Terminal, and open the Terminal application.
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.
Load the new shell configuration, then confirm that Micromamba returns a version number.
source ~/.zshrc
micromamba --version
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
Activate the new environment. The Terminal prompt should begin with (cpc_id_env).
micromamba activate cpc_id_env
Install TensorFlow inside the activated cpc_id_env environment.
python -m pip install tensorflow
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.
Each time you open a new Terminal window, activate the environment before running the AI code.
micromamba activate cpc_id_env
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