Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: unrecognized engine zarr must be one of: ['netcdf4', 'scipy', 'store'] #5395

Closed
iuryt opened this issue May 28, 2021 · 6 comments

Comments

@iuryt
Copy link

iuryt commented May 28, 2021

Hi,

I am trying to load MUR data from AWS on Google Colab just as Chelle did for her Pangeo tutorial.
https://github.com/pangeo-gallery/osm2020tutorial/blob/master/AWS-notebooks/aws_mur_sst_tutorial_long.ipynb

What happened:

---------------------------------------------------------------------------

ValueError                                Traceback (most recent call last)

<ipython-input-15-363886c4b27b> in <module>()
      1 import xarray as xr
      2 
----> 3 ds = xr.open_zarr('https://mur-sst.s3.us-west-2.amazonaws.com/zarr-v1',consolidated=True)

2 frames

/usr/local/lib/python3.7/dist-packages/xarray/backends/plugins.py in get_backend(engine)
    133         if engine not in engines:
    134             raise ValueError(
--> 135                 f"unrecognized engine {engine} must be one of: {list(engines)}"
    136             )
    137         backend = engines[engine]

ValueError: unrecognized engine zarr must be one of: ['netcdf4', 'scipy', 'store']

What you expected to happen:

Load Zarr data from S3.

Minimal Complete Verifiable Example:

import xarray as xr
ds = xr.open_zarr('https://mur-sst.s3.us-west-2.amazonaws.com/zarr-v1',consolidated=True)

Anything else we need to know?:

I am using Google Colab.

Environment:

Output of xr.show_versions()

INSTALLED VERSIONS

commit: None
python: 3.7.10 (default, May 3 2021, 02:48:31)
[GCC 7.5.0]
python-bits: 64
OS: Linux
OS-release: 5.4.109+
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.12.0
libnetcdf: 4.7.4

xarray: 0.18.2
pandas: 1.1.5
numpy: 1.19.5
scipy: 1.4.1
netCDF4: 1.5.6
pydap: None
h5netcdf: None
h5py: 3.1.0
Nio: None
zarr: 2.8.3
cftime: 1.5.0
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: 1.3.2
dask: 2.12.0
distributed: 1.25.3
matplotlib: 3.2.2
cartopy: None
seaborn: 0.11.1
numbagg: None
pint: None
setuptools: 56.1.0
pip: 19.3.1
conda: None
pytest: 3.6.4
IPython: 5.5.0
sphinx: 1.8.5

@keewis
Copy link
Collaborator

keewis commented May 28, 2021

I got the same error without zarr installed, but this does work for me after installing zarr so I'm inclined to believe there's something wrong with your environment. How did you set it up?

@iuryt
Copy link
Author

iuryt commented May 28, 2021

As I am using Google Colab I simply installed zarr and xarray using pip (as they suggest) and tried to run the command.

!pip install zarr xarray

Maybe this is something with the way Colab setup things, but it would be nice to have a way to make it work. I am planning to use it in a course and Colab helps to save time on the installing process.

@keewis
Copy link
Collaborator

keewis commented May 28, 2021

I had to install a few other packages, but it did work for me. Here's what I did:

mamba env create -n test python=3.7; conda activate test  # to get a fresh environment with py37
python -m pip install ipython
ipython
In [1]: !pip install zarr xarray fsspec aiohttp requests
In [2]: import xarray as xr
   ...: ds = xr.open_zarr('https://mur-sst.s3.us-west-2.amazonaws.com/zarr-v1',consolidated=True)

I don't know anything about Google Colab, though, so there might be something specific you have to do.

output of xr.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.10 | packaged by conda-forge | (default, Feb 19 2021, 16:07:37) 
[GCC 9.3.0]
python-bits: 64
OS: Linux
OS-release: 4.19.0-16-amd64
machine: x86_64
processor: 
byteorder: little
libhdf5: None
libnetcdf: None

xarray: 0.18.2
pandas: 1.2.4
numpy: 1.20.3
scipy: None
netCDF4: None
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: 2.8.3
cftime: None
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: None
dask: None
distributed: None
matplotlib: None
cartopy: None
seaborn: None
numbagg: None
pint: None
setuptools: 49.6.0.post20210108
pip: 21.1.2
conda: None
pytest: None
IPython: 7.23.1
sphinx: None

@keewis
Copy link
Collaborator

keewis commented May 28, 2021

actually, did you try !pip install xarray[complete]?

@iuryt
Copy link
Author

iuryt commented May 28, 2021

actually, did you try !pip install xarray[complete]?

That worked! Thanks!

@iuryt iuryt closed this as completed May 28, 2021
@ryanjdillon
Copy link

zarr and other formats can be installed with only xarray[io] if you don't need all the other bits.

http://xarray.pydata.org/en/stable/getting-started-guide/installing.html#instructions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants