ecmwf / cfgrib

A Python interface to map GRIB files to the NetCDF Common Data Model following the CF Convention using ecCodes
Apache License 2.0
400 stars 77 forks source link

cfgrib doesn't install in a new conda environment on windows10 #208

Closed jsillin closed 3 years ago

jsillin commented 3 years ago

I am trying to install cfgrib in a brand new conda environment with nothing else installed. conda install cfgrib and conda install cfgrib eccodes (have tried both) yield

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
Examining conflict for setuptools python cfgrib wheel pip:  38%|█████████               | 6/16 [00:01<00:02,  3.94it/s]/Examining conflict for setuptools python wincertstore cfgrib wheel pip certifi:  50%|█▌ | 8/16 [00:01<00:01,  4.14it/s]|Examining conflict for setuptools wincertstore cfgrib wheel pip certifi:  56%|█████▋    | 9/16 [00:02<00:01,  3.92it/s]-Examining conflict for setuptools python tzdata wincertstore cfgrib wheel pip certifi:  62%|▋| 10/16 [00:02<00:01,  3.7|Examining conflict for setuptools cfgrib wheel pip certifi:  69%|███████████████▏      | 11/16 [00:02<00:01,  3.73it/s]-failed

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\cli\install.py", line 265, in install
        should_retry_solve=(_should_retry_unfrozen or repodata_fn != repodata_fns[-1]),
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\core\solve.py", line 117, in solve_for_transaction
        should_retry_solve)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\core\solve.py", line 158, in solve_for_diff
        force_remove, should_retry_solve)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\core\solve.py", line 281, in solve_final_state
        ssc = self._run_sat(ssc)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
        return f(*args, **kwds)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\core\solve.py", line 808, in _run_sat
        should_retry_solve=ssc.should_retry_solve
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
        return f(*args, **kwds)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\resolve.py", line 1316, in solve
        raise UnsatisfiableError({})
    conda.exceptions.UnsatisfiableError:
    Did not find conflicting dependencies. If you would like to know which
    packages conflict ensure that you have enabled unsatisfiable hints.

    conda config --set unsatisfiable_hints True

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\exceptions.py", line 1079, in __call__
        return func(*args, **kwargs)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
        exit_code = do_call(args, p)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 82, in do_call
        return getattr(module, func_name)(args, parser)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\cli\main_install.py", line 20, in execute
        install(args, parser, 'install')
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\cli\install.py", line 299, in install
        should_retry_solve=(repodata_fn != repodata_fns[-1]),
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\core\solve.py", line 117, in solve_for_transaction
        should_retry_solve)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\core\solve.py", line 158, in solve_for_diff
        force_remove, should_retry_solve)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\core\solve.py", line 281, in solve_final_state
        ssc = self._run_sat(ssc)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
        return f(*args, **kwds)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\core\solve.py", line 808, in _run_sat
        should_retry_solve=ssc.should_retry_solve
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
        return f(*args, **kwds)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\resolve.py", line 1318, in solve
        self.find_conflicts(specs, specs_to_add, history_specs)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\resolve.py", line 347, in find_conflicts
        bad_deps = self.build_conflict_map(specs, specs_to_add, history_specs)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\resolve.py", line 507, in build_conflict_map
        root, search_node, dep_graph, num_occurances)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\resolve.py", line 369, in breadth_first_search_for_dep_graph
        last_spec = MatchSpec.union((path[-1], target_paths[-1][-1]))[0]
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\models\match_spec.py", line 481, in union
        return cls.merge(match_specs, union=True)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\models\match_spec.py", line 475, in merge
        reduce(lambda x, y: x._merge(y, union), group) if len(group) > 1 else group[0]
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\models\match_spec.py", line 475, in <lambda>
        reduce(lambda x, y: x._merge(y, union), group) if len(group) > 1 else group[0]
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\models\match_spec.py", line 502, in _merge
        final = this_component.union(that_component)
      File "C:\Users\Jack\anaconda3\lib\site-packages\conda\models\match_spec.py", line 764, in union
        return '|'.join(options)
    TypeError: sequence item 0: expected str instance, Channel found

`$ C:\Users\Jack\anaconda3\Scripts\conda-script.py install cfgrib eccodes`

  environment variables:
                 CIO_TEST=<not set>
        CONDA_DEFAULT_ENV=thesis3
                CONDA_EXE=C:\Users\Jack\anaconda3\condabin\..\Scripts\conda.exe
               CONDA_EXES="C:\Users\Jack\anaconda3\condabin\..\Scripts\conda.exe"
             CONDA_PREFIX=C:\Users\Jack\anaconda3\envs\thesis3
           CONDA_PREFIX_1=C:\Users\Jack\anaconda3
           CONDA_PREFIX_2=C:\Users\Jack\anaconda3\envs\thesis
           CONDA_PREFIX_3=C:\Users\Jack\anaconda3\envs\thesis2
    CONDA_PROMPT_MODIFIER=(thesis3)
         CONDA_PYTHON_EXE=C:\Users\Jack\anaconda3\python.exe
               CONDA_ROOT=C:\Users\Jack\anaconda3
              CONDA_SHLVL=4
                 HOMEPATH=\Users\Jack
                     PATH=C:\Users\Jack\anaconda3;C:\Users\Jack\anaconda3\Library\mingw-w64\bin;
                          C:\Users\Jack\anaconda3\Library\usr\bin;C:\Users\Jack\anaconda3\Librar
                          y\bin;C:\Users\Jack\anaconda3\Scripts;C:\Users\Jack\anaconda3\bin;C:\U
                          sers\Jack\anaconda3\envs\thesis3;C:\Users\Jack\anaconda3\envs\thesis3\
                          Library\mingw-w64\bin;C:\Users\Jack\anaconda3\envs\thesis3\Library\usr
                          \bin;C:\Users\Jack\anaconda3\envs\thesis3\Library\bin;C:\Users\Jack\an
                          aconda3\envs\thesis3\Scripts;C:\Users\Jack\anaconda3\envs\thesis3\bin;
                          C:\Users\Jack\anaconda3\condabin;C:\Windows\system32;C:\Windows;C:\Win
                          dows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windo
                          ws\System32\OpenSSH;C:\Program Files (x86)\NVIDIA
                          Corporation\PhysX\Common;C:\Program Files\Docker\Docker\resources\bin;
                          C:\ProgramData\DockerDesktop\version-bin;C:\Users\Jack\AppData\Local\M
                          icrosoft\WindowsApps;C:\Users\Jack\AppData\Local\atom\bin;C:\Program
                          Files (x86)\FAHClient;C:\Users\Jack\AppData\Local\GitHubDesktop\bin
             PSMODULEPATH=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\Windows
                          PowerShell\v1.0\Modules
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>

     active environment : thesis3
    active env location : C:\Users\Jack\anaconda3\envs\thesis3
            shell level : 4
       user config file : C:\Users\Jack\.condarc
 populated config files : C:\Users\Jack\.condarc
          conda version : 4.8.2
    conda-build version : 3.18.11
         python version : 3.7.6.final.0
       virtual packages : __cuda=9.1
       base environment : C:\Users\Jack\anaconda3  (writable)
           channel URLs : https://conda.anaconda.org/aph42/win-64
                          https://conda.anaconda.org/aph42/noarch
                          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
                          https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : C:\Users\Jack\anaconda3\pkgs
                          C:\Users\Jack\.conda\pkgs
                          C:\Users\Jack\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\Jack\anaconda3\envs
                          C:\Users\Jack\.conda\envs
                          C:\Users\Jack\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.6 Windows/10 Windows/10.0.19041
          administrator : False
             netrc file : None
           offline mode : False

An unexpected error has occurred. Conda has prepared the above report.

which is strange since there is no package in that environment with which cfgrib could conflict.

jsillin commented 3 years ago

Update: fixed by upgrading conda to 4.9.2

alexamici commented 3 years ago

Note that the only supported install procedure with conda is via conda-forge with the command line:

conda install -c conda-forge cfgrib

as per https://github.com/ecmwf/cfgrib#installation

jsillin commented 3 years ago

Thanks for that heads-up! Interestingly, conda install cfgrib eccodes worked on conda 4.9.2. At least nothing has broken yet haha