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 False then do not 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:

>>> environment()
Platform: Linux-4.15.0-72-generic-x86_64-with-debian-stretch-sid
HDF5 library: 1.10.2
netcdf library: 4.6.1
python: 3.7.3 /home/user/anaconda3/bin/python
netCDF4: 1.5.3 /home/user/anaconda3/lib/python3.7/site-packages/netCDF4/__init__.py
cftime: 1.2.1 /home/user/anaconda3/lib/python3.7/site-packages/cftime/__init__.py
numpy: 1.16.2 /home/user/anaconda3/lib/python3.7/site-packages/numpy/__init__.py
cfdm: 1.8.6.0
>>> environment(paths=False)
Platform: Linux-4.15.0-72-generic-x86_64-with-debian-stretch-sid
HDF5 library: 1.10.2
netcdf library: 4.6.1
python: 3.7.3
netCDF4: 1.5.3
cftime: 1.2.1
numpy: 1.16.2
cfdm: 1.8.6.0