Skip to content

Installation fails for statsforecast due to llvmlite Python version constraint #9413

@asdf8601

Description

@asdf8601

Description

When trying to install statsforecast using uv, the installation fails due to
a Python version constraint in llvmlite==0.36.0.

  RuntimeError: Cannot install on Python version 3.10.15; only versions >=3.6,<3.10
  are supported.

Environment

  • Python version: 3.10.15
  • uv version: 0.5.4 (c62c83c 2024-11-20)
  • Operating System: macOS

Steps to Reproduce

  1. Create a new virtual environment with uv
  2. Install numpy and statsforecast
    • uv pip install numpy statsforecast
    • uv add numpy statsforecast

Workarounds

Adding dependencies one by one:

# In this order, the opposite results in the same error.
uv add statsforecast
uv add numpy

Using python-venv and pip works fine:

$ python -m venv .venv-pip

$ ./.venv-pip/bin/pip install numpy statsforecast -q -I

[notice] A new release of pip is available: 23.0.1 -> 24.3.1
[notice] To update, run: python -m pip install --upgrade pip

Log

$ python -V
Python 3.10.15

$ uv version
uv 0.5.4 (c62c83c37 2024-11-20)

Installing numpy and statsforecast

$ uv python pin 3.10

$ uv venv

$ . .venv/bin/activate

$ uv pip install numpy statsforecast
Resolved 14 packages in 17ms
  × Failed to download and build `llvmlite==0.36.0`
  ╰─▶ 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
      "/Users/asdf8601/.cache/uv/builds-v0/.tmppKvNui/lib/python3.10/site-packages/setuptools/
build_meta.py",
      line 334, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
        File
      "/Users/asdf8601/.cache/uv/builds-v0/.tmppKvNui/lib/python3.10/site-packages/setuptools/
build_meta.py",
      line 304, in _get_build_requires
          self.run_setup()
        File
      "/Users/asdf8601/.cache/uv/builds-v0/.tmppKvNui/lib/python3.10/site-packages/setuptools/
build_meta.py",
      line 522, in run_setup
          super().run_setup(setup_script=setup_script)
        File
      "/Users/asdf8601/.cache/uv/builds-v0/.tmppKvNui/lib/python3.10/site-packages/setuptools/
build_meta.py",
      line 320, in run_setup
          exec(code, locals())
        File "<string>", line 55, in <module>
        File "<string>", line 52, in _guard_py_ver
      RuntimeError: Cannot install on Python version 3.10.15; only versions >=3.6,<3.10
      are supported.

  help: `llvmlite` (v0.36.0) was included because `statsforecast` (v0.7.1) depends on
        `numba` (v0.53.1) which depends on `llvmlite`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions