The easiest way to get everything installed is to use conda command line tool:
$ conda install cftime
We recommend using the community maintained conda-forge channel if you need difficult-to-build dependencies such as cartopy or pynio:
$ conda install -c conda-forge cftime
New releases may also appear in conda-forge before being updated in the default channel.
If you don’t use conda, be sure you have the required dependencies (numpy and cython) installed first. Then, install cftime with pip:
$ pip install cftime