.. currentmodule:: cfdm .. default-role:: obj .. _Installation: **Installation** ================ ---- Version |release| for version |version| of the CF conventions. .. contents:: :local: :backlinks: entry .. _Python-versions: **Python versions** ------------------- cfdm works for Python 2.7 and Python 3. ---- .. _pip: **pip** ------- To install cfdm and all of its :ref:`dependencies ` run, for example: .. code-block:: console :caption: *Install as root, with any missing dependencies.* $ pip install cfdm .. code-block:: console :caption: *Install as a user, with any missing dependencies.* $ pip install cfdm --user To install cfdm without any of its dependencies then run, for example: .. code-block:: console :caption: *Install as root without installing any of the dependencies.* $ pip install cfdm --no-deps See the `documentation for pip install `_ for further options. ---- .. _Source: **Source** ---------- To install from source: 1. Download the cfdm package from https://pypi.org/project/cfdm 2. Unpack the library (replacing ```` with the version that you want to install, e.g. ``1.8.0``): .. code:: console $ tar zxvf cfdm-.tar.gz $ cd cfdm- 3. Install the package: * To install the cfdm package to a central location: .. code:: console $ python setup.py install * To install the cfdm package locally to the user in the default location: .. code:: console $ python setup.py install --user * To install the cfdm package in the ```` of your choice: .. code:: console $ python setup.py install --home= ---- .. _cfdump-utility: **cfdump utility** ------------------ During installation the :ref:`cfdump command line utility ` is also installed, which generates text descriptions of the :term:`field constructs ` contained in a netCDF dataset. ---- .. _Tests: **Tests** --------- Tests are run from within the ``cfdm/test`` directory: .. code:: console $ python run_tests.py ---- .. _Dependencies: **Dependencies** ---------------- The cfdm package requires: * `Python `_, version 2.7 or 3 or newer, * `numpy `_, version 1.15 or newer, * `netCDF4 `_, version 1.5.3 or newer, * `cftime `_, version 1.1.1 or newer (note that this library is installed with netCDF4, but possibly not a new enough version), and * `future `_, version 0.16.0 or newer. ---- .. _Code-repository: **Code repository** ------------------- The complete source code is available at https://github.com/NCAS-CMS/cfdm .. .. rubric:: Footnotes .. [#installfiles] The ``requirements.txt`` file contains .. include:: ../../requirements.txt :literal: