# cf.environment¶

cf.environment(display=True, paths=True)[source]

Return the names and versions of the cf package and its dependencies.

Parameters
display: bool, optional

If False then return the description of the environment as a string. By default the description is printed.

paths: bool, optional

If False then do not output the locations of each package.

New in version 3.0.6.

Returns
None or str

If display is True then the description of the environment is printed and None is returned. Otherwise the description is returned as a string.

Examples

>>> cf.environment()
Platform: Linux-4.15.0-54-generic-x86_64-with-glibc2.10
HDF5 library: 1.10.6
netcdf library: 4.8.0

>>> cf.environment(paths=False)
Platform: Linux-4.15.0-54-generic-x86_64-with-glibc2.10
HDF5 library: 1.10.6
netcdf library: 4.8.0
udunits2 library: libudunits2.so.0
ESMF: 8.1.1
Python: 3.8.10