-
Notifications
You must be signed in to change notification settings - Fork 40
Install using conda forge (recommended)
We offer an installation for conda users under linux-64 or osx-64. Support for Windows is not available yet.
https://anaconda.org/conda-forge/pcmdi_metrics
- Install the Anaconda for Python 3.9 package (we recommend installing this for each user)
- Alternatives include Miniconda or Miniforge/Mambaforge
- If using Anaconda or Miniconda, we recommend also installing mamba for better performance
- Make sure anaconda is in your PATH (assuming anaconda is installed in ${HOME}/anaconda
-
export PATH=${HOME}/anaconda/bin:${PATH}
# for [ba]sh -
setenv PATH ${HOME}/anaconda/bin:${PATH}
# for [t]csh
-
Make sure you have no environment variables set from an old UV-CDAT installation in your PATH
/PYTHONPATH
,LD_LIBRARY_PATH
etc
If your institution has tight ssl certificate/security issues try:
conda config --set ssl_verify False
binstar config --set ssl_verify False
You can install the PCMDI Metrics package from the PCMDI conda-forge channel. For the best performance, use mamba. For faster installation without mamba, specify versions of python and pcmdi_metrics.
- Create a new virtual environment and install PMP
- Using mamba
mamba create -n [YOUR_CONDA_ENVIRONMENT] -c conda-forge pcmdi_metrics
- Using conda
conda create -n [YOUR_CONDA_ENVIRONMENT] -c conda-forge python=[VERSION] pcmdi_metrics=[VERSION]
e.g.conda create -n pcmdi_metrics -c conda-forge python=3.10 pcmdi_metrics=3.0.1
- or
conda create -n [YOUR_CONDA_ENVIRONMENT]
conda activate [YOUR_CONDA_ENVIRONMENT]
conda install -c conda-forge python=[VERSION] pcmdi_metrics=[VERSION]
- Using mamba
- Apple Silicon M1 or M2:
- The CDAT dependency is not available for this architecture, so you will need to create an environment using x86 builds. This article from Towards Data Science has more information about managing Conda environments on Apple Silicon chips.
CONDA_SUBDIR=osx-64 conda create -n [YOUR_CONDA_ENVIRONMENT] -c conda-forge python=[VERSION]
conda activate [YOUR_CONDA_ENVIRONMENT]
conda config --env --set subdir osx-64
-
mamba install -c conda-forge pcmdi_metrics
orconda install -c conda-forge pcmdi_metrics=[VERSION]
- The CDAT dependency is not available for this architecture, so you will need to create an environment using x86 builds. This article from Towards Data Science has more information about managing Conda environments on Apple Silicon chips.
- Install PMP in the current (or existing) virtual environment
-
mamba install -c conda-forge pcmdi_metrics
orconda install -c conda-forge pcmdi_metrics
-
To learn more about conda environments see: http://conda.pydata.org/docs/using/envs.html
This error is related to the version of the "notebook" dependency.
Error:
done
ERROR conda.core.link:_execute(952): An error occurred while installing package 'conda-forge::nb_conda-2.2.1-unix_6'.
Rolling back transaction: done
post-link script failed for package conda-forge::nb_conda-2.2.1-unix_6
location of failed script: /global/homes/a/aordonez/miniconda3/envs/test_nb2/bin/.nb_conda-post-link.sh
==> script messages <==
/global/homes/a/aordonez/miniconda3/envs/test_nb2/bin/.nb_conda-post-link.sh: line 2: /global/homes/a/aordonez/miniconda3/envs/test_nb2/bin/jupyter-nbextension: No such file or directory
/global/homes/a/aordonez/miniconda3/envs/test_nb2/bin/.nb_conda-post-link.sh: line 3: /global/homes/a/aordonez/miniconda3/envs/test_nb2/bin/jupyter-serverextension: No such file or directory
==> script output <==
stdout:
stderr:
return code: 127
()
Solution:
Pin the version of notebook in your install command to be less than 7.0.0. For example:
mamba create -n [YOUR_CONDA_ENVIRONMENT] -c conda-forge pcmdi_metrics notebook=6.5.4