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

Dependencies installation failing with Python 3.12 #50

Open
ben-jy opened this issue Jul 3, 2024 · 1 comment · May be fixed by #54
Open

Dependencies installation failing with Python 3.12 #50

ben-jy opened this issue Jul 3, 2024 · 1 comment · May be fixed by #54
Assignees
Labels
bug Something isn't working

Comments

@ben-jy
Copy link
Collaborator

ben-jy commented Jul 3, 2024

While Python 3.12 is said supported ("python = ">=3.10,<3.13" in pyproject.toml file), dependencies installation fails when using this version. This failure seems to be caused by a Pytorch version, which depends on the triton libary version that can not be found.
This issue does not occur with Python 3.10 and 3.11.

Steps to reproduce

  1. Install python 3.12 (or use a conda environment with python 3.12)
  2. Install poetry with pip install poetry
  3. Install dependencies with poetry install
  4. Installation fails with the following error logs :
  - Installing triton (2.1.0): Failed

  RuntimeError

  Unable to find installation candidates for triton (2.1.0)

  at ~/.local/share/pypoetry/venv/lib/python3.12/site-packages/poetry/installation/chooser.py:74 in choose_for
       70│
       71│             links.append(link)
       72│
       73│         if not links:
    →  74│             raise RuntimeError(f"Unable to find installation candidates for {package}")
       75│
       76│         # Get the best link
       77│         chosen = max(links, key=lambda link: self._sort_key(package, link))
       78│

Cannot install triton.

Expected behavior

The installation should complete without errors, setting up all dependencies required for the project.

Environment:

  • OS: [Ubuntu 22.04.3 LTS] (through WSL2)
  • Python Version: [3.12.4]
  • Poetry Version: [1.8.3]
@ben-jy ben-jy added the bug Something isn't working label Jul 3, 2024
@ben-jy ben-jy changed the title Depedencies installation failing with Python 3.12 Dependencies installation failing with Python 3.12 Jul 3, 2024
@ben-jy
Copy link
Collaborator Author

ben-jy commented Jul 24, 2024

It's seems that there is also a problem with other libraries. When trying to add ontime as a dependency of a new project with python 3.12, I get a new error :

  - Downgrading numpy (1.26.0 -> 1.25.2): Failed

  ChefBuildError

  Backend 'setuptools.build_meta:__legacy__' is not available.
  
  Cannot import 'setuptools.build_meta'

  at ~/.local/share/pypoetry/venv/lib/python3.12/site-packages/poetry/installation/chef.py:164 in _prepare
      160│ 
      161│                 error = ChefBuildError("\n\n".join(message_parts))
      162│ 
      163│             if error is not None:
    → 164│                 raise error from None
      165│ 
      166│             return path
      167│ 
      168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with numpy (1.25.2) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "numpy (==1.25.2)"'.

This numpy version (1.25.2) is a depedency of skforecast, which is not support until python 3.11. Again, there is no issue with version 3.11, therefore we should set the maximum supported version of Python to 3.11.

@ben-jy ben-jy linked a pull request Jul 24, 2024 that will close this issue
@ben-jy ben-jy removed a link to a pull request Jul 24, 2024
@ben-jy ben-jy linked a pull request Jul 24, 2024 that will close this issue
@ben-jy ben-jy linked a pull request Jul 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants