Install Xarray on ArcGIS Notebook Server

Xarray is one of key package in Pangeo.

Step-by-Step Guide for 10.8

  • !conda update -y -n base -c defaults conda
  • !conda install -y xarray

Step-by-Step Guide for 10.7.1

ArcGIS 10.7.1 Notebook Server has a bug that doesn't allow to use conda for installing xarray.

You need to use pip instead of conda.

  • !pip install --upgrade pandas
  • !pip install --upgrade netCDF4
  • !pip install --upgrade bottleneck
  • !pip install xarray

You may encounter error message that can be ignored:

    ERROR: fastai 1.0.50.post1 requires nvidia-ml-py3, which is not installed.

NVDIA GPU enabled instance may help to get rid of the above warning.

Use the Following code to test xarray

import xarray as xr import numpy as np data = xr.DataArray(np.random.randn(2, 3), dims=('x', 'y'), coords={'x': [10, 20]}) print(data)