Installing pre-built binaries with conda (Mac OSX, Linux, and Windows)¶
You can install CLIMLAB and all its dependencies with:
conda install -c conda-forge climlab
Or (recommended) add
conda-forge to your conda channels with:
conda config --add channels conda-forge
and then simply do:
conda install climlab
Binaries are available for OSX, Linux, and Windows.
Installing into a self-contained conda environment¶
To avoid issues with package conflicts, it’s often best to work in self-contained environments. This example installs climlab and jupyter along with all their dependencies in a fresh environment:
conda create --name climlab-test --channel conda-forge climlab jupyter
conda activate climlab-test
Installing on Google Colab¶
The following code will install climlab and its dependencies on Google Colab:
!pip install -q condacolab
!conda install -c conda-forge climlab
Installing from source¶
You can clone the source code repository with:
git clone https://github.com/climlab/climlab.git
and from the
climlab directory, do:
python -m pip install . --no-deps -vv
Please see Contributing to CLIMLAB for more details.
About the compiled Fortran components¶
Climlab itself is pure Python and should work on any system. As of version 0.8.0, all the Fortran code has been moved into external companion packages climlab-rrtmg, climlab-cam3-radiation, and climlab-emanuel-convection.
If you install climlab via conda-forge, these pre-compiled dependencies will be installed automatically.
It is possible to install and run climlab without the compiled dependencies. In this case you should then find that you can still:
and use most of the package. You will see warning messages about the missing components.
Stables releases as well as the current development version can be found on github:
These are handled automatically if you install with conda.
Python (currently testing on versions 3.8, 3.9, 3.10, 3.11)
pooch (for remote data access and caching)
xarray (for data handling)
climlab will still run on Python 2.7 on some systems but we are no longer supporting this
Recommended for full functionality¶
numba (used for acceleration of some components)
pytest (to run the automated tests, important if you are developing new code)
Anaconda Python is highly recommended and will provide everything you need. See “Installing pre-built binaries with conda” above.