cfdm.environment

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

Return the names, versions and paths of all dependencies.

New in version (cfdm): 1.7.0

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 True (the default) then output the locations of each package.

Returns
None or list

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

Examples

>>> cfdm.environment()
Platform: Linux-5.14.0-1048-oem-x86_64-with-glibc2.31
HDF5 library: 1.12.1
netcdf library: 4.8.1
Python: 3.9.12 /home/user/miniconda3/bin/python
netCDF4: 1.6.0 /home/user/miniconda3/lib/python3.9/site-packages/netCDF4/__init__.py
numpy: 1.22.3 /home/user/miniconda3/lib/python3.9/site-packages/numpy/__init__.py
cfdm.core: 1.11.0.0 /home/user/miniconda3/lib/python3.9/site-packages/cfdm/core/__init__.py
scipy: 1.11.3 /home/user/miniconda3/lib/python3.11/site-packages/scipy/__init__.py
cftime: 1.6.1 /home/user/miniconda3/lib/python3.9/site-packages/cftime/__init__.py
netcdf_flattener: 1.2.0 /home/user/miniconda3/lib/python3.9/site-packages/netcdf_flattener/__init__.py
cfdm: 1.11.0.0 /home/user/miniconda3/lib/python3.9/site-packages/cfdm/__init__.py
>>> cfdm.environment(paths=False)
HDF5 library: 1.12.1
netcdf library: 4.8.1
Python: 3.9.12
netCDF4: 1.6.0
numpy: 1.22.3
cfdm.core: 1.11.0.0
scipy: 1.11.3
cftime: 1.6.1
netcdf_flattener: 1.2.0
cfdm: 1.11.0.0