Installation¶
Quick Install¶
You can use pip to install directly.
pip install sacpy
Install Sacpy in the Conda environment¶
You may skip this step if your Conda 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 Silicone)¶
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh
Linux¶
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
Windows¶
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe # or Copy Link to Browser for download
Step 2: Install Miniconda3¶
chmod +x Miniconda3-latest-*.sh && ./Miniconda3-latest-*.sh # windows just click the .exe and install
During the installation, a path <base-path>
needs to be specified as the base location of the python environment.
After the installation is done, we need to add the two lines into your shell environment (e.g., ~/.bashrc
or ~/.zshrc
) as below to enable the conda
package manager (remember to change <base-path>
with your real location):
export PATH="<base-path>/bin:$PATH"
. <base-path>/etc/profile.d/conda.sh
Windows can add conda-bin path to $PATH automatically.
Step 3: Test your Installation¶
source ~/.bashrc # assume you are using Bash shell
which python # should return a path under <base-path>
which conda # should return a path under <base-path>
Windows can skip this step, or
conda activate
Step 4: Install Sacpy¶
Taking a clean installation as example, first let’s create a new environment named cfr-env
via conda
conda create -n sacpy python=3.10
conda activate sacpy
Then install some dependencies via conda
:
conda install jupyter notebook cartopy xarray scipy numpy pandas netcdf4 dask
Once the above dependencies have been installed, simply
pip install sacpy
and you are ready to
import sacpy as scp
in Python.