Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
benatouba opened this issue Nov 23, 2024 · 4 comments · Fixed by #75
Closed

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

benatouba opened this issue Nov 23, 2024 · 4 comments · Fixed by #75
Labels

Comments

@benatouba
Copy link
Contributor

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
benatouba added a commit to benatouba/cosipy that referenced this issue Nov 23, 2024
benatouba added a commit to benatouba/cosipy that referenced this issue Nov 23, 2024
@gampnico
Copy link
Collaborator

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

@benatouba
Copy link
Contributor Author

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

@gampnico gampnico added the bug label Nov 25, 2024
@gampnico
Copy link
Collaborator

gampnico commented Nov 27, 2024

Ref: #75 (comment)

I can't reproduce this issue, nor does it occur in the CI workflow (which installs COSIPY as an editable, and from the requirements file). Please may you run pip cache purge and reinstall in a clean environment? If you are reusing an environment, then pip install --upgrade -e . might also solve this issue.

If that doesn't work, please may you let me know:

  1. Your OS (and distro if applicable)?
  2. Are you installing using .venv, conda, or mamba?
  3. If you are installing with conda/mamba, are you mixing pip and conda install commands? e.g. conda install gdal with pip install -e .?

@benatouba
Copy link
Contributor Author

I used the pip interface of uv, because of performance. It has its own resolver. It seems the issue was/is upstream, with that resolver. Using uv sync works fine as well.

I reinstalled from a clean venv python3.12.7 environment with plain pip and it works. So it was just a special case because of the uncommon tooling that I use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants