Skip to content

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

@peanutfun

Description

@peanutfun

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):

  • Operating system and version: macOS and Windows
  • Python version: 3.11

Additional context
See #900 for changes in the documentation

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions