Open eryk-slowinski opened 4 years ago
The conda package 'eccodes' at the moment only includes the library itself; not its Python interface. This is sufficient to make dependencies, such as cfgrib, Magics and Metview work. To use the low-level Python API you need to install it with "pip install eccodes". Very soon the Python interface should be part of the conda install.
conda install eccodes
Doesn't work for me at all. I installed eccodes via pip, as you propsed.
python -m eccodes selfcheck
returns the same error:RuntimeError: Could not load the ecCodes library!
However
python -m cfgrib selfcheck
returns
Found: ecCodes v2.17.0.
Your system is ready.
Sorry, took me a while to get a Windows machine to test. For me eccodes and cfgrib work. You say "conda install eccodes - Doesn't work for me at all." What does not work? Do you get an error when you run the install command?
conda install eccodes
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- eccodes
Current channels:
- 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
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
As with 'cfgrib' (https://github.com/ecmwf/cfgrib/issues/136) 'eccodes' is only available from the conda-forge repo. As described on https://github.com/ecmwf/eccodes-python, you can install eccodes with "conda install -c conda-forge eccodes".
With "conda install -c conda-forge eccodes" I have a very big error (like 1000+ lines) so I will paste only this:
Package anaconda-project conflicts for:
anaconda-navigator -> anaconda-project[version='>=0.4']
anaconda==2020.02 -> anaconda-project==0.8.4=py_0The following specifications were found to be incompatible with your CUDA driver:
- feature:/win-64::__cuda==10.1=0
- feature:|@/win-64::__cuda==10.1=0
Your installed CUDA driver is: 10.1
So this means I need other version of CUDA driver and anaconda?
I tried various versions and combinations of packages under Windows but I am not able to reproduce your error. A bit googling showed me that others (unrelated to eccodes) have challenges with conda and cuda. Could you try an conda environment without cuda?
It seems like it has conflict with everything:
Package scikit-learn conflicts for:
anaconda==2020.02 -> scikit-learn==0.22.1[build='py37h6288b17_0|py36h6288b17_0|py38h6288b17_0']
nltk -> scikit-learn
Package pyepsg conflicts for:
iris -> cartopy[version='>=0.14'] -> pyepsg
cartopy -> pyepsg
Package liblief conflicts for:
py-lief -> liblief==0.9.0[build='ha925a31_3|ha925a31_2|ha925a31_0']
anaconda==2020.02 -> liblief==0.9.0=ha925a31_2
conda-build -> py-lief -> liblief==0.9.0[build='ha925a31_3|ha925a31_2|ha925a31_0']
Package brotlipy conflicts for:
requests -> urllib3[version='>=1.21.1,<1.26,!=1.25.0,!=1.25.1'] -> brotlipy[version='>=0.6.0']
urllib3 -> brotlipy[version='>=0.6.0']
Package owslib conflicts for:
iris -> cartopy[version='>=0.14'] -> owslib
cartopy -> owslib
Package pathtools conflicts for:
anaconda==2020.02 -> pathtools==0.1.2=py_1
anaconda==2020.02 -> watchdog==0.10.2=py36_0 -> pathtools[version='>=0.1.1']
spyder -> watchdog -> pathtools[version='>=0.1.1']
watchdog -> pathtools[version='>=0.1.1']
Package gmpy2 conflicts for:
sympy -> mpmath[version='>=0.19'] -> gmpy2
mpmath -> gmpy2
List like above is very long (over 6000 lines). You think total reinstalling whole conda environment can help?
i am having same problem but using venv.
I have them installed on the environment
cycler 0.11.0 debugpy 1.6.7 decorator 5.1.1 distlib 0.3.6 earthpy 0.9.4 eccodes 1.6.1 enpt-enmapboxapp 0.7.6 entrypoints 0.4
I run the code in jupyter notebook and works, but when I run it on .py is not working.
I am using xarray so i dont need to import eccodes directly, and I got same error:
lib\site-packages\xarray\backends\plugins.py:80: RuntimeWarning: Engine 'cfgrib' loading failed: Cannot find the ecCodes library warnings.warn(f"Engine {name!r} loading failed:\n{ex}", RuntimeWarning)
If I try to explicitly import eccodes , same error
I am using vs code, on windows 11
please help
Hi I am trying to import eccodes in my python code and I run into error :
Command
python -m cfgrib selfcheck
returnsI am using Windows 10 and latest relase of conda and python