cryotools / cosipy

Coupled snowpack and ice surface energy and mass balance model in Python
GNU General Public License v3.0
52 stars 30 forks source link

Installing from requirements-file fails because of numba version #74

Open benatouba opened 2 days ago

benatouba commented 2 days ago

Numba version is not specified in requirements files and pyproject-file.

The installation fails (tested on python>=3.11) as pip solves version constraints by choosing numba 0.53.1

Numba added support for numpy2.0 in 0.60. I suggest using this version.

Stacktrace:

  × Failed to download and build `numba==0.53.1`
  ╰─▶ Build backend failed to determine requirements with `build_wheel()` (exit status: 1)

      [stderr]
      Traceback (most recent call last):
        File "<string>", line 14, in <module>
        File "/home/ben/.cache/uv/builds-v0/.tmpegLw1v/lib/python3.11/site-packages/setuptools/build_meta.py", line 334,
      in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/ben/.cache/uv/builds-v0/.tmpegLw1v/lib/python3.11/site-packages/setuptools/build_meta.py", line 304,
      in _get_build_requires
          self.run_setup()
        File "/home/ben/.cache/uv/builds-v0/.tmpegLw1v/lib/python3.11/site-packages/setuptools/build_meta.py", line 522,
      in run_setup
          super().run_setup(setup_script=setup_script)
        File "/home/ben/.cache/uv/builds-v0/.tmpegLw1v/lib/python3.11/site-packages/setuptools/build_meta.py", line 320,
      in run_setup
          exec(code, locals())
        File "<string>", line 50, in <module>
        File "<string>", line 47, in _guard_py_ver
      RuntimeError: Cannot install on Python version 3.11.6; only versions >=3.6,<3.10 are supported.

  help: `numba` (v0.53.1) was included because `cosipymodel` (v2.0.0) depends on `numba
gampnico commented 6 hours ago

Thanks, did this occur with pip install cosipymodel or with pip install -r requirements.txt (or some other installation method)?

benatouba commented 6 hours ago

Only when installing via any requirements file or editable mode (pip install -e .). The released version does not seem to be affected.