CLIMADA-project/climada_petals

'Found Conflicts!' Installation

Closed this issue · 6 comments

I have been trying to install climada_petals, however I always get stuck in the step 3 of the 'Advanced Instructions' Installation (below), which never finishes.

conda env create -n climada_env -f requirements/env_climada.yml
conda env update -n climada_env -f requirements/env_developer.yml
conda activate climada_env

My last try has been running for more than 12 hours now. Would you know how to fix it?

(base) C:\Users\Administrator\Documents\CLIMADA>cd C:\Users\Administrator\Documents\CLIMADA\climada_python

(base) C:\Users\Administrator\Documents\CLIMADA\climada_python>git clone https://github.com/CLIMADA-project/climada_petals.git
Cloning into 'climada_petals'...
remote: Enumerating objects: 29109, done.
remote: Counting objects: 100% (6081/6081), done.
remote: Compressing objects: 100% (1566/1566), done.
Receiving objects: 100% (29109/29109), 142.78 MiB | 6.34 MiB/s, done.ed 23028Receiving objects: 100% (29109/29109), 141.58 MiB | 10.55 MiB/s

Resolving deltas: 100% (21902/21902), done.

(base) C:\Users\Administrator\Documents\CLIMADA\climada_python>cd climada_petals

(base) C:\Users\Administrator\Documents\CLIMADA\climada_python\climada_petals>git checkout develop
Switched to a new branch 'develop'
branch 'develop' set up to track 'origin/develop'.

(base) C:\Users\Administrator\Documents\CLIMADA\climada_python\climada_petals>conda env update -n climada_env -f requirements/env_climada.yml
Collecting package metadata (repodata.json): done
Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
Examining conflict for numpy shapely netcdf4 cftime dask folium patsy matplotlib-base bokeh bottleneck gdal salib numexpr arrow-cpp liblapack libblas statsmodels fiona /

Conda is notorious for taking a long time to resolve the environment. Given that new versions for packages can be released at any time, it might actually fail, as reported also in CLIMADA-project/climada_python#671

One possible solution is switching to the much faster Mamba package manager, that acts as a drop-in replacement for conda https://mamba.readthedocs.io/en/latest/

If this issue persists, please report the conflicting packages here.

@lauradealmeidapereira : At this very moment, it is possible that the conflicts remain. (Sorry for that: the documentation and the env_climada.yml file are not in sync right now, I'm working on it.)
I suggest to skip step 3 altogether and go straight to step 4:

conda activate climada_env
python -m pip install -e ./

After that you should be set. You may run into an error, something like: package skimage not found though. But it can be easily resolved by pip install scikit-image.

Thanks a lot @peanutfun and @emanuel-schmid. Both solutions worked, with some adaptations.

For the first option, advised by @peanutfun, climada_petals installation was successful after downloading Mamba. However, when reproducing the climada_petals tutorials, I faced the package skimage not found error, which could be solved with pip install scikit-image. It may be also nice to mention that I had to run Anaconda Prompt as administrator and to activate climada environment conda activate climada_env.

Since I am installing Climada also on another computer, I tried the second option, advised by @emanuel-schmid.
At this time, I got the following error message after the running the fourth step of the installation python -m pip install -e ./:

 Building wheel for cartopy (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for cartopy (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [286 lines of output]
      <string>:90: UserWarning: Unable to determine GEOS version. Ensure you have 3.7.2 or later installed, or installation may fail.

...

"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -I. -I./lib/cartopy -IC:\Users\Administrator\AppData\Local\Temp\pip-build-env-v9krapti\overlay\Lib\site-packages\numpy\core\include -IC:\Users\Administrator\anaconda3\include -IC:\Users\Administrator\anaconda3\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tplib/cartopy/trace.cpp /Fobuild\temp.win-amd64-cpython-310\Release\lib/cartopy/trace.obj
      trace.cpp
      lib/cartopy/trace.cpp(767): fatal error C1083: Cannot open include file: 'geos_c.h': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cartopy
  Building wheel for cfgrib (pyproject.toml) ... done

However, this problem could be solved with conda install -c conda-forge cartopy.

Again, when reproducing the first climada_petals tutorial, I had the package skimage not found issue, which could be solved, as mentioned by @emanuel-schmid, by installing scikit-image:

Running Anaconda Prompt as Administrator, going to the right directory and install it

conda activate climada_env
pip install scikit-image

Thank you one more time for your support.

🧐 Are you still facing any issues or were both installations successful?

Both were successful! Thanks =)

@emanuel-schmid This relates to #65. We should only list additional requirements for Petals in its environment specs.