Open lukelbd opened 6 years ago
IIRC, you also have to build xarray from their master branch. When I did it about a month ago, I just took the conda-forge feedstocks for both pynio and xarray, changed the URLs to the proper branches, built them with conda-build, and installed them with conda install --use-local xarray pynio
.
It's been working for me, so I hope the official release comes soon.
In case people are still getting this error. This issue was helpful to me.
I was getting the same error. I had a stable but out of date environment:
# packages in environment at /home/clepore/.conda/envs/general_python2_7:
#
affine 2.1.0 py_1 conda-forge
asciitree 0.3.3 py27_1 conda-forge
asn1crypto 0.22.0 py27_0 conda-forge
attrs 17.3.0 py_0 conda-forge
backports 1.0 py27_1 conda-forge
backports.functools_lru_cache 1.4 py27_1 conda-forge
backports.lzma 0.0.11 py27_0 conda-forge
backports.shutil_get_terminal_size 1.0.0 py_3 conda-forge
backports_abc 0.5 py27_0 conda-forge
basemap 1.1.0 py27_3 conda-forge
beautifulsoup4 4.6.0 <pip>
beautifulsoup4 4.6.0 py27_0 conda-forge
blas 1.0 mkl
bleach 2.0.0 py27_0 conda-forge
blosc 1.12.0 1 conda-forge
bokeh 0.12.10 py27_0 conda-forge
boost 1.65.1 py27_0 conda-forge
boost-cpp 1.65.1 1 conda-forge
boto3 1.4.7 py27_0 conda-forge
botocore 1.5.92 py27_0 conda-forge
bottleneck 1.2.1 py27_1 conda-forge
bzip2 1.0.6 1 conda-forge
ca-certificates 2017.7.27.1 0 conda-forge
cairo 1.14.6 5 conda-forge
cartopy 0.16.0 py27_0 conda-forge
certifi 2017.7.27.1 py27_0 conda-forge
cffi 1.10.0 py27_0 conda-forge
chardet 3.0.4 py27_0 conda-forge
click 6.7 py27_0 conda-forge
click-plugins 1.0.3 py27_0 conda-forge
cligj 0.4.0 py27_0 conda-forge
cloudpickle 0.4.0 py27_0 conda-forge
colorcet 1.0.0 py_0 conda-forge
configparser 3.5.0 py27_0 conda-forge
coverage 4.4.2 <pip>
coveralls 1.2.0 <pip>
cryptography 2.0.3 py27_0 conda-forge
curl 7.55.1 0 conda-forge
cycler 0.10.0 py27_0 conda-forge
cyordereddict 1.0.0 py27_1 conda-forge
cython 0.27.3 py27_0 conda-forge
cytoolz 0.8.2 py27_0 conda-forge
dask 0.15.4 py_0 conda-forge
dask-core 0.15.4 py_0 conda-forge
dask-glm 0.1.1.dev1+g64e01eb <pip>
dask-searchcv 0.1.0 py_0 conda-forge
datashader 0.6.2 py_0 conda-forge
datashape 0.5.4 py27_0 conda-forge
dbus 1.10.22 0 conda-forge
decorator 4.1.2 py27_0 conda-forge
distributed 1.19.3 py27_0 conda-forge
docopt 0.6.2 <pip>
docutils 0.14 py27_0 conda-forge
ecmwf_grib 1.23.1 1 conda-forge
entrypoints 0.2.3 py27_1 conda-forge
enum34 1.1.6 py27_1 conda-forge
expat 2.1.0 3 conda-forge
fasteners 0.14.1 py27_2 conda-forge
fastparquet 0.1.3 py27_0 conda-forge
fontconfig 2.12.1 5 conda-forge
freetype 2.7 2 conda-forge
freexl 1.0.2 2 conda-forge
funcsigs 1.0.2 py_2 conda-forge
functools32 3.2.3.2 py27_1 conda-forge
futures 3.0.5 py27_0 conda-forge
g2clib 1.6.0 4 conda-forge
gcsfs 0.0.3 py27_0 conda-forge
gdal 2.2.3 py27_0 conda-forge
geos 3.6.2 1 conda-forge
geotiff 1.4.2 0 conda-forge
geoviews 1.4.2 py27_0 ioam
gettext 0.19.7 1 conda-forge
giflib 5.1.4 0 conda-forge
glib 2.51.4 0 conda-forge
gmp 6.1.2 0 conda-forge
graphite2 1.3.9 0 conda-forge
graphviz 0.8.1 <pip>
gsl 2.4 h1bed415_3
gst-plugins-base 1.8.0 0 conda-forge
gstreamer 1.8.0 2 conda-forge
h5netcdf 0.5.0 py_0 conda-forge
h5py 2.7.1 py27_2 conda-forge
harfbuzz 1.4.3 0 conda-forge
hdf4 4.2.13 0 conda-forge
hdf5 1.10.1 1 conda-forge
hdfeos2 2.19.1 8 conda-forge
heapdict 1.0.0 py27_0 conda-forge
holoviews 1.9.1 py27_0 conda-forge
html5lib 0.999999999 py27_0 conda-forge
httplib2 0.10.3 py27_0 conda-forge
icu 58.1 1 conda-forge
idna 2.6 py27_1 conda-forge
imageio 2.2.0 py27_0 conda-forge
ipaddress 1.0.18 py27_0 conda-forge
ipykernel 4.6.1 py27_0 conda-forge
ipython 5.5.0 py27_0 conda-forge
ipython_genutils 0.2.0 py27_0 conda-forge
ipywidgets 7.0.3 py27_1 conda-forge
jasper 1.900.1 4 conda-forge
jinja2 2.9.6 py27_0 conda-forge
jmespath 0.9.3 py27_0 conda-forge
jpeg 9b 2 conda-forge
json-c 0.12.1 0 conda-forge
jsonschema 2.6.0 py27_0 conda-forge
jupyter 1.0.0 py27_0 conda-forge
jupyter_client 5.1.0 py27_0 conda-forge
jupyter_console 5.2.0 py27_0 conda-forge
jupyter_core 4.4.0 py_0 conda-forge
jupyter_dashboards 0.7.0 py27_0 conda-forge
jupyterlab 0.29.1 py27_0 conda-forge
jupyterlab_launcher 0.5.5 py27_0 conda-forge
kealib 1.4.7 4 conda-forge
keras 2.0.6 py27_0 conda-forge
krb5 1.14.2 0 conda-forge
lancet 0.9.0 py27_0 conda-forge
libdap4 3.18.3 2 conda-forge
libffi 3.2.1 3 conda-forge
libgcc 7.2.0 h69d50b8_2
libgcc-ng 7.2.0 h7cc24e2_2
libgdal 2.2.3 1 conda-forge
libgfortran 3.0.0 1
libgfortran-ng 7.2.0 hdf63c60_3
libgpuarray 0.7.4 0 conda-forge
libiconv 1.14 4 conda-forge
libkml 1.3.0 4 conda-forge
libnetcdf 4.4.1.1 10 conda-forge
libopenblas 0.2.20 h9ac9557_4
libpng 1.6.28 2 conda-forge
libpq 9.6.3 0 conda-forge
libsodium 1.0.10 0 conda-forge
libspatialite 4.3.0a 17 conda-forge
libssh2 1.8.0 2 conda-forge
libstdcxx-ng 7.2.0 h7a57d05_2
libtiff 4.0.7 1 conda-forge
libxcb 1.12 1 conda-forge
libxml2 2.9.5 1 conda-forge
libxslt 1.1.29 5 conda-forge
llvmlite 0.20.0 py27_0
locket 0.2.0 py27_1 conda-forge
lxml 4.1.1 py27_0 conda-forge
lz4 0.10.1 py27_0
mako 1.0.7 py27_0 conda-forge
markupsafe 1.0 py27_0 conda-forge
matplotlib 2.1.0 py27_1 conda-forge
metpy 0.6.1 py27_0 conda-forge
mistune 0.8 py27_0 conda-forge
monotonic 1.5 py_0 conda-forge
mpi4py 3.0.0 py27_0 conda-forge
mpich 3.2 5 conda-forge
msgpack-python 0.4.8 py27_0 conda-forge
multipledispatch 0.4.9 py27_0 conda-forge
nbconvert 5.3.1 py_1 conda-forge
nbformat 4.4.0 py27_0 conda-forge
ncurses 5.9 10 conda-forge
netcdf4 1.3.1 py27_1 conda-forge
networkx 1.11 py27_0 conda-forge
nodejs 6.11.0 0 conda-forge
nomkl 1.0 0
notebook 5.2.1 py27_2 conda-forge
numba 0.35.0 np113py27_10
numcodecs 0.5.5 py27_0 conda-forge
numpy 1.13.3 py27_nomklh2b20989_4 [nomkl]
oauth2client 4.1.2 py27_0 conda-forge
olefile 0.44 py27_0 conda-forge
openblas 0.2.19 2 conda-forge
openjpeg 2.3.0 1 conda-forge
openssl 1.0.2l 0 conda-forge
owslib 0.15.0 py_0 conda-forge
pandas 0.21.0 py27_0 conda-forge
pandoc 2.0.0.1 1 conda-forge
pandocfilters 1.4.1 py27_0 conda-forge
pango 1.40.4 0 conda-forge
param 1.5.1 py27_0 conda-forge
partd 0.3.8 py27_0 conda-forge
pathlib2 2.3.0 py27_0 conda-forge
patsy 0.4.1 py27_0 conda-forge
pcre 8.39 0 conda-forge
pexpect 4.2.1 py27_0 conda-forge
pickleshare 0.7.4 py27_0 conda-forge
pillow 4.3.0 py27_1 conda-forge
pint 0.8.1 py27_0 conda-forge
pip 9.0.1 py27_0 conda-forge
pixman 0.34.0 0 conda-forge
poppler 0.61.1 2 conda-forge
poppler-data 0.4.8 0 conda-forge
proj4 4.9.3 5 conda-forge
prompt_toolkit 1.0.15 py27_0 conda-forge
protobuf 3.5.0 py27_0 conda-forge
psutil 5.4.0 py27_0 conda-forge
ptyprocess 0.5.2 py27_0 conda-forge
py 1.4.34 py27_0 conda-forge
pyasn1 0.3.7 py_0 conda-forge
pyasn1-modules 0.1.5 py_0 conda-forge
pycparser 2.18 py27_0 conda-forge
Pydap 3.2.2 <pip>
pyepsg 0.3.2 py27_0 conda-forge
pygments 2.2.0 py27_0 conda-forge
pygpu 0.7.4 py27_0 conda-forge
pygrib 2.0.2 py27_1 conda-forge
pynio 1.5.0 py27_1 conda-forge
pyopenssl 17.2.0 py27_0 conda-forge
pyparsing 2.2.0 py27_0 conda-forge
pyproj 1.9.5.1 py27_0 conda-forge
pyqt 5.6.0 py27_4 conda-forge
pyshp 1.2.12 py_0 conda-forge
pysocks 1.6.7 py27_0 conda-forge
pytest 3.2.3 py27_0 conda-forge
pytest-cov 2.5.1 <pip>
python 2.7.14 1 conda-forge
python-blosc 1.4.4 py27_0 conda-forge
python-dateutil 2.6.1 py27_0 conda-forge
pytz 2017.3 py_2 conda-forge
pywavelets 0.5.2 py27_1 conda-forge
pyyaml 3.12 py27_1 conda-forge
pyzmq 16.0.2 py27_2 conda-forge
qt 5.6.2 6 conda-forge
qtconsole 4.3.1 py27_0 conda-forge
r-base 3.4.1 1 conda-forge
rasterio 0.36.0 py27h453aca2_1
readline 6.2 0 conda-forge
requests 2.18.4 py27_1 conda-forge
rpy2 2.8.5 py27r3.4.1_0 conda-forge
rsa 3.4.2 py27_0 conda-forge
s3fs 0.1.2 py27_0 conda-forge
s3transfer 0.1.11 py27_0 conda-forge
scandir 1.6 py27_0 conda-forge
scikit-image 0.13.0 py27_3 conda-forge
scikit-learn 0.19.1 py27_nomklh6479e79_0 [nomkl]
scipy 1.1.0 py27_nomklh9d22d0a_0 [nomkl]
seaborn 0.8.1 py27_0 conda-forge
setuptools 36.6.0 py27_1 conda-forge
shapely 1.6.2 py27_1 conda-forge
simplegeneric 0.8.1 py27_0 conda-forge
singledispatch 3.4.0.3 py27_0 conda-forge
sip 4.18 py27_1 conda-forge
siphon 0.6.1 py27_0 conda-forge
six 1.11.0 py27_1 conda-forge
snappy 1.1.7 1 conda-forge
snuggs 1.4.1 py27_0 conda-forge
sortedcontainers 1.5.7 py27_0 conda-forge
sqlite 3.13.0 1 conda-forge
ssl_match_hostname 3.5.0.1 py27_1 conda-forge
statsmodels 0.8.0 py27_0 conda-forge
subprocess32 3.2.7 py27_0 conda-forge
tblib 1.3.2 py27_0 conda-forge
terminado 0.6 py27_0 conda-forge
testpath 0.3.1 py27_0 conda-forge
theano 0.9.0 py27_1 conda-forge
thrift 0.10.0 py27_0 conda-forge
tk 8.5.19 2 conda-forge
toolz 0.8.2 py_2 conda-forge
tornado 4.5.2 py27_0 conda-forge
traitlets 4.3.2 py27_0 conda-forge
urllib3 1.22 py27_0 conda-forge
util-linux 2.21 0
wcwidth 0.1.7 py27_0 conda-forge
webencodings 0.5 py27_0 conda-forge
WebOb 1.7.3 <pip>
wheel 0.30.0 py_1 conda-forge
widgetsnbextension 3.0.6 py27_0 conda-forge
xarray 0.10.2 py27_0
xerces-c 3.2.0 0 conda-forge
xorg-libxau 1.0.8 3 conda-forge
xorg-libxdmcp 1.1.2 3 conda-forge
xz 5.2.3 0 conda-forge
yaml 0.1.6 0 conda-forge
zarr 2.2.0 py_1 conda-forge
zeromq 4.2.1 1 conda-forge
zict 0.1.3 py_0 conda-forge
zlib 1.2.11 0 conda-forge
and loading a grib file works.
Python 2.7.14 | packaged by conda-forge | (default, Nov 4 2017, 10:15:28)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xarray as xr
>>> temp = xr.open_dataset('/Data2/SubX/EMC/GEFS/pr_sfc/1999/01/pr_sfc_GEFS_06jan1999_00z_d01_d35_m00.grb2', engine='pynio')
>>> temp
<xarray.Dataset>
Dimensions: (forecast_time0: 35, lat_0: 181, lon_0: 360)
Coordinates:
* forecast_time0 (forecast_time0) timedelta64[ns] 01:00:00 02:00:00 ...
* lon_0 (lon_0) float32 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 ...
* lat_0 (lat_0) float32 90.0 89.0 88.0 87.0 86.0 85.0 84.0 83.0 ...
Data variables:
APCP_P1_L1_GLL0 (forecast_time0, lat_0, lon_0) float32 ...
I was trying to create a new python 3 environment, but when I try to use xarray and pynio, I got the same error.
One of the main difference was that I was mixing channels:
# Name Version Build Channel
blas 1.1 openblas conda-forge
bokeh 0.13.0 py36_0
boost-cpp 1.67.0 h14c3975_4
bottleneck 1.2.1 py36h035aef0_1
bzip2 1.0.6 h14c3975_5
ca-certificates 2018.03.07 0
cairo 1.14.12 he6fea26_5 conda-forge
certifi 2018.10.15 py36_0
cftime 1.0.0b1 py36h035aef0_0
click 7.0 py36_0
cloudpickle 0.6.1 py36_0
curl 7.61.1 hbc83047_0
cycler 0.10.0 py36_0
cytoolz 0.9.0.1 py36h14c3975_1
dask 0.19.4 py36_0
dask-core 0.19.4 py36_0
dbus 1.13.0 h3a4f0e9_0 conda-forge
distributed 1.23.3 py36_0
esmf 7.1.0r ha678704_2 conda-forge
expat 2.2.6 he6710b0_0
fontconfig 2.13.0 h9420a91_0
freetype 2.9.1 h8a8886c_1
freexl 1.0.5 h14c3975_0
g2clib 1.6.0 h838ce51_4
geos 3.6.2 heeff764_2
geotiff 1.4.2 h8e81d37_0
gettext 0.19.8.1 hd7bead4_3
giflib 5.1.4 h14c3975_1
glib 2.55.0 h464dc38_2 conda-forge
gsl 2.2.1 h0c605f7_3
gst-plugins-base 1.12.5 hde13a9d_0 conda-forge
gstreamer 1.12.5 h61a6719_0 conda-forge
h5netcdf 0.6.2 py_0 conda-forge
h5py 2.8.0 py36h989c5e5_3
hdf4 4.2.13 h3ca952b_2
hdf5 1.10.2 hba1933b_1
hdfeos2 2.20 h64bfcee_0
hdfeos5 5.1.16 h647bee3_2 conda-forge
heapdict 1.0.0 py36_2
icu 58.2 h9c2bf20_1
intel-openmp 2019.0 118
jasper 1.900.1 hd497a04_4
jinja2 2.10 py36_0
jpeg 9c h470a237_1 conda-forge
json-c 0.12.1 ha6a3662_2
kealib 1.4.9 h0bee7d0_2 conda-forge
kiwisolver 1.0.1 py36hf484d3e_0
krb5 1.16.1 hc83ff2d_6
libboost 1.67.0 h46d08c1_4
libcurl 7.61.1 heec0ca6_0
libdap4 3.19.1 h6ec2957_0
libedit 3.1.20170329 h6b74fdf_2
libffi 3.2.1 hd88cf55_4
libgcc-ng 8.2.0 hdf63c60_1
libgdal 2.2.4 he036fc0_8 conda-forge
libgfortran 3.0.0 1
libgfortran-ng 7.3.0 hdf63c60_0
libiconv 1.15 h63c8f33_5
libkml 1.3.0 h590aaf7_4
libnetcdf 4.6.1 h10edf3e_1
libopenblas 0.2.20 h9ac9557_7
libpng 1.6.35 hbc83047_0
libpq 10.5 h1ad7b7a_0
libspatialite 4.3.0a h72746d6_18
libssh2 1.8.0 h9cfc8f7_4
libstdcxx-ng 8.2.0 hdf63c60_1
libtiff 4.0.9 he85c1e1_2
libuuid 1.0.3 h1bed415_2
libxcb 1.13 h1bed415_1
libxml2 2.9.8 h26e45fe_1
locket 0.2.0 py36_1
markupsafe 1.0 py36h14c3975_1
matplotlib 2.2.2 py36hb69df0a_2
mkl 2019.0 118
mkl_fft 1.0.1 py36h3010b51_0
mkl_random 1.0.1 py36h629b387_0
mpi 1.0 mpich conda-forge
mpich 3.2.1 h26a2512_4 conda-forge
msgpack-python 0.5.6 py36h6bb024c_1
ncl 6.5.0 blas_openblashd40de8d_1 [blas_openblas] conda-forge
ncurses 6.1 hf484d3e_0
netcdf-fortran 4.4.4 h4363f12_9 conda-forge
netcdf4 1.4.1 py36h4b4f87f_0
numpy 1.14.3 py36h28100ab_1
numpy-base 1.14.3 py36h0ea5e3f_1
openblas 0.2.20 4
openblas-devel 0.2.20 7
openjpeg 2.3.0 h05c96fa_1
openssl 1.0.2p h14c3975_0
packaging 18.0 py36_0
pandas 0.23.4 py36h04863e7_0
partd 0.3.9 py36_0
pcre 8.42 h439df22_0
pip 10.0.1 py36_0
pixman 0.34.0 hceecf20_3
poppler 0.67.0 h4d7e492_3 conda-forge
poppler-data 0.4.9 0
proj4 4.9.3 hc8507d1_7
psutil 5.4.7 py36h14c3975_0
pyngl 1.6.0 py36h4217dbb_0 conda-forge
pynio 1.5.2 py36h36f4ed2_0 conda-forge
pyparsing 2.2.2 py36_0
pyqt 5.6.0 py36h22d08a2_6
python 3.6.6 h6e4f718_2
python-dateutil 2.7.3 py36_0
pytz 2018.5 py36_0
pyyaml 3.13 py36h14c3975_0
qt 5.6.2 hf70d934_9 conda-forge
readline 7.0 h7b6447c_5
scipy 1.1.0 py36_nomklh9d22d0a_0 [nomkl]
setuptools 40.4.3 py36_0
sip 4.18.1 py36hf484d3e_2
six 1.11.0 py36_1
sortedcontainers 2.0.5 py36_0
sqlite 3.25.2 h7b6447c_0
tblib 1.3.2 py36_0
tk 8.6.8 hbc83047_0
toolz 0.9.0 py36_0
tornado 5.1.1 py36h7b6447c_0
udunits2 2.2.25 hd30922c_1
util-linux 2.21 0
wheel 0.32.1 py36_0
xarray 0.10.9 py36_0
xerces-c 3.2.0 h524ea4d_2
xorg-imake 1.0.7 0 conda-forge
xorg-kbproto 1.0.7 h470a237_2 conda-forge
xorg-libice 1.0.9 h470a237_4 conda-forge
xorg-libsm 1.2.2 h470a237_5 conda-forge
xorg-libx11 1.6.6 h470a237_0 conda-forge
xorg-libxaw 1.0.13 h470a237_2 conda-forge
xorg-libxext 1.3.3 h470a237_4 conda-forge
xorg-libxmu 1.1.2 h470a237_2 conda-forge
xorg-libxpm 3.5.12 h470a237_2 conda-forge
xorg-libxrender 0.9.10 h470a237_2 conda-forge
xorg-libxt 1.1.5 h470a237_2 conda-forge
xorg-makedepend 1.0.5 0 conda-forge
xorg-renderproto 0.11.1 h470a237_2 conda-forge
xorg-xextproto 7.3.0 h470a237_2 conda-forge
xorg-xproto 7.0.31 h470a237_7 conda-forge
xz 5.2.4 h14c3975_4
yaml 0.1.7 had09818_2
zict 0.1.3 py36_0
zlib 1.2.11 ha838bed_2
based on this issue I updated all the packages from the channel conda-forge
conda update --all -c conda-forge
and now it works.
Keep in mind that my environment was brand new so I didn't have any reason to use other channels, but some specific packages in your environment might need a specific channel which is not conda-forge.
Hi folks,
Thanks for updating
pynio
for python3 (#10). I created a virtual environment for the developer branch (as advised) withconda create -n pynio -c ncar -c conda-forge pynio=dev python=3
, activated it with. activate pynio
, and installed xarray to the virtual environment withconda install xarray
. Unfortunately when trying to open an ERA-Interim GRIB file I get aModuleNotFound
error (the moduleNio
can't be found); included is the full traceback.Also, for what it's worth, I also tried installing
pynio
without creating a virtual environment into my existing anaconda environment; in this case, I get an entirely different error having to do with a missing object file from the library "libkea":Any idea what these issues could be?