Closed
Description
What happened?
Installing version 0.21.0
from conda-forge results in a ModuleNotFoundError
on import (for Python 3.9, at least).
What did you expect to happen?
For xarray to import without crashing.
Minimal Complete Verifiable Example
(base) > conda create -y -n _xarray_bug --override-channels -c conda-forge python=3.9 xarray
...
The following NEW packages will be INSTALLED:
...
python conda-forge/win-64::python-3.9.10-hcf16a7b_1_cpython
...
xarray conda-forge/noarch::xarray-0.21.0-pyhd8ed1ab_0
...
(base) > conda activate _xarray_bug
(_xarray_bug) > python -c "import xarray"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Anaconda3\envs\_xarray_bug\lib\site-packages\xarray\__init__.py", line 1, in <module>
from . import testing, tutorial, ufuncs
File "C:\Anaconda3\envs\_xarray_bug\lib\site-packages\xarray\testing.py", line 8, in <module>
from xarray.core import duck_array_ops, formatting, utils
File "C:\Anaconda3\envs\_xarray_bug\lib\site-packages\xarray\core\duck_array_ops.py", line 24, in <module>
from . import dask_array_compat, dask_array_ops, dtypes, npcompat, nputils
File "C:\Anaconda3\envs\_xarray_bug\lib\site-packages\xarray\core\dask_array_compat.py", line 4, in <module>
from packaging.version import Version
ModuleNotFoundError: No module named 'packaging'
Relevant log output
No response
Anything else we need to know?
No response
Environment
(_xarray_bug) > python -c "import xarray as xr;xr.show_versions()"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Anaconda3\envs\_xarray_bug\lib\site-packages\xarray\__init__.py", line 1, in <module>
from . import testing, tutorial, ufuncs
File "C:\Anaconda3\envs\_xarray_bug\lib\site-packages\xarray\testing.py", line 8, in <module>
from xarray.core import duck_array_ops, formatting, utils
File "C:\Anaconda3\envs\_xarray_bug\lib\site-packages\xarray\core\duck_array_ops.py", line 24, in <module>
from . import dask_array_compat, dask_array_ops, dtypes, npcompat, nputils
File "C:\Anaconda3\envs\_xarray_bug\lib\site-packages\xarray\core\dask_array_compat.py", line 4, in <module>
from packaging.version import Version
ModuleNotFoundError: No module named 'packaging'
(_xarray_bug) > conda info
active environment : _xarray_bug
active env location : C:\Anaconda3\envs\_xarray_bug
shell level : 2
user config file : C:\Users\Work\.condarc
populated config files : C:\Users\Work\.condarc
conda version : 4.11.0
conda-build version : 3.21.6
python version : 3.9.7.final.0
virtual packages : __win=0=0
__archspec=1=x86_64
base environment : C:\Anaconda3 (writable)
conda av data dir : C:\Anaconda3\etc\conda
conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Anaconda3\pkgs
C:\Users\Work\.conda\pkgs
C:\Users\Work\AppData\Local\conda\conda\pkgs
envs directories : C:\Anaconda3\envs
C:\Users\Work\.conda\envs
C:\Users\Work\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.11.0 requests/2.26.0 CPython/3.9.7 Windows/10 Windows/10.0.19044
administrator : True
netrc file : None
offline mode : False
(_xarray_bug) > conda list
# packages in environment at C:\Anaconda3\envs\_xarray_bug:
#
# Name Version Build Channel
bzip2 1.0.8 h8ffe710_4 conda-forge
ca-certificates 2021.10.8 h5b45459_0 conda-forge
importlib-metadata 4.10.1 py39hcbf5309_0 conda-forge
importlib_metadata 4.10.1 hd8ed1ab_0 conda-forge
intel-openmp 2022.0.0 h57928b3_3663 conda-forge
libblas 3.9.0 13_win64_mkl conda-forge
libcblas 3.9.0 13_win64_mkl conda-forge
libffi 3.4.2 h8ffe710_5 conda-forge
liblapack 3.9.0 13_win64_mkl conda-forge
libzlib 1.2.11 h8ffe710_1013 conda-forge
mkl 2022.0.0 h0e2418a_796 conda-forge
numpy 1.22.1 py39h6331f09_0 conda-forge
openssl 3.0.0 h8ffe710_2 conda-forge
pandas 1.4.0 py39h2e25243_0 conda-forge
pip 22.0.2 pyhd8ed1ab_0 conda-forge
python 3.9.10 hcf16a7b_1_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python_abi 3.9 2_cp39 conda-forge
pytz 2021.3 pyhd8ed1ab_0 conda-forge
setuptools 60.6.0 py39hcbf5309_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sqlite 3.37.0 h8ffe710_0 conda-forge
tbb 2021.5.0 h2d74725_0 conda-forge
tk 8.6.11 h8ffe710_1 conda-forge
typing_extensions 4.0.1 pyha770c72_0 conda-forge
tzdata 2021e he74cb21_0 conda-forge
ucrt 10.0.20348.0 h57928b3_0 conda-forge
vc 14.2 hb210afc_6 conda-forge
vs2015_runtime 14.29.30037 h902a5da_6 conda-forge
wheel 0.37.1 pyhd8ed1ab_0 conda-forge
xarray 0.21.0 pyhd8ed1ab_0 conda-forge
xz 5.2.5 h62dcd97_1 conda-forge
zipp 3.7.0 pyhd8ed1ab_0 conda-forge
Activity
H0R5E commentedon Jan 31, 2022
Never mind. For those that follow there is already an issue in the feedstock repo.
Also #6207.