CLIMADA-project / climada_python

Python (3.8+) version of CLIMADA
GNU General Public License v3.0
291 stars 115 forks source link

Installing Python first and requirements later might cause compatibility issues #903

Closed peanutfun closed 4 days ago

peanutfun commented 1 week ago

Describe the bug When following the Advanced Instructions for installation, users create an environment with a specific Python version and then add the requirements for Climada. The current approach may cause compatibility issues because the Python version is pinned. With Python being the only requirement when creating the environment, the version will be pinned to the latest bugfix version, e.g. 3.11.9. However, there might be some packages in the Climada dependencies that have not been updated to 3.11.9. Conda then reports that it cannot resolve the environment.

This behavior was found by @spjuhel

To Reproduce Steps to reproduce the behavior/error (on 2024-06-21)

mamba create -n climada_env python=3.11  # Installs 3.11.9
mamba env update -n climada_env -f requirements/env_climada.yml  # Fails

How to solve Using a wildcard for the bugfix version indicates that Conda may downgrade the Python version

mamba create -n climada_env python="3.11.*"  # Installs 3.11.9
mamba env update -n climada_env -f requirements/env_climada.yml  # Downgrades to Python 3.11.6, works

Climada Version: develop

System Information (please complete the following information):

Additional context See #900 for changes in the documentation

peanutfun commented 4 days ago

Fixed by #900