Installation¶
Optional dependencies¶
For netCDF and IO¶
For accelerating xarray¶
- bottleneck: speeds up NaN-skipping and rolling window aggregations by a large factor
- cyordereddict: speeds up most internal operations with xarray data structures
For parallel computing¶
- dask.array: required for Out of core computation with dask.
For plotting¶
- matplotlib: required for Plotting.
- cartopy: recommended for Maps.
Instructions¶
xarray itself is a pure Python package, but its dependencies are not. The easiest way to get them installed is to use conda. You can then install xarray with its recommended dependencies with the conda command line tool:
$ conda install xarray dask netCDF4 bottleneck
Note
You might consider using the conda-forge channel, as it has been shown to be more up-to-date and to better handle package dependencies.
If you don’t use conda, be sure you have the required dependencies (numpy and pandas) installed first. Then, install xarray with pip:
$ pip install xarray
To run the test suite after installing xarray, install py.test and run py.test xarray.