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

[Bug]: ModuleNotFoundError: No module named 'packaging' #6215

Closed
H0R5E opened this issue Jan 31, 2022 · 1 comment
Closed

[Bug]: ModuleNotFoundError: No module named 'packaging' #6215

H0R5E opened this issue Jan 31, 2022 · 1 comment
Labels
bug needs triage Issue that has not been reviewed by xarray team member

Comments

@H0R5E
Copy link

H0R5E commented Jan 31, 2022

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
@H0R5E H0R5E added bug needs triage Issue that has not been reviewed by xarray team member labels Jan 31, 2022
@H0R5E
Copy link
Author

H0R5E commented Jan 31, 2022

Never mind. For those that follow there is already an issue in the feedstock repo.

Also #6207.

@H0R5E H0R5E closed this as completed Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage Issue that has not been reviewed by xarray team member
Projects
None yet
Development

No branches or pull requests

1 participant