deepcharles / ruptures

ruptures: change point detection in Python
BSD 2-Clause "Simplified" License
1.54k stars 160 forks source link

Unable to install in Poetry 1.7.1 #317

Open drjct opened 7 months ago

drjct commented 7 months ago

I started a fresh repo and I'm using poetry to install ruptures. There are no other dependencies, just ruptures.

MacOS 14.1 Python = 3.9.12 poetry = 1.7.1

Here's the traceback:

➜ poetry add ruptures    
Using version ^1.1.8 for ruptures

Updating dependencies
Resolving dependencies... (0.1s)

Package operations: 3 installs, 0 updates, 0 removals

  • Installing numpy (1.26.2)
  • Installing scipy (1.11.4)
  • Installing ruptures (1.1.8): Failed

  OverrideNeeded

  ({Package('oldest-supported-numpy', '2023.10.25'): {'numpy': <Dependency numpy (==1.22.2)>}}, {Package('oldest-supported-numpy', '2023.10.25'): {'numpy': <Dependency numpy (==1.21.0)>}}, {Package('oldest-supported-numpy', '2023.10.25'): {'numpy': <Dependency numpy (==1.19.3)>}}, {Package('oldest-supported-numpy', '2023.10.25'): {'numpy': <Dependency numpy (==1.25.0)>}}, {Package('oldest-supported-numpy', '2023.10.25'): {'numpy': <Dependency numpy (==1.23.3)>}}, {Package('oldest-supported-numpy', '2023.10.25'): {'numpy': <Dependency numpy (<empty>)>}})

  at ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/poetry/puzzle/provider.py:660 in complete_package
      656│                     current_overrides.update({dependency_package: package_overrides})
      657│                     overrides.append(current_overrides)
      658│ 
      659│             if overrides:
    → 660│                 raise OverrideNeeded(*overrides)
      661│ 
      662│         # Modifying dependencies as needed
      663│         clean_dependencies = []
      664│         for dep in dependencies:

The following error occurred when trying to handle this error:

  OverrideNeeded

  {Package('oldest-supported-numpy', '2023.10.25'): {'numpy': <Dependency numpy (==1.21.0)>}, Package('oldest-supported-numpy', '2023.8.3'): {'numpy': <Dependency numpy (==1.21.0)>}}

  at ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/poetry/puzzle/provider.py:660 in complete_package
      656│                     current_overrides.update({dependency_package: package_overrides})
      657│                     overrides.append(current_overrides)
      658│ 
      659│             if overrides:
    → 660│                 raise OverrideNeeded(*overrides)
      661│ 
      662│         # Modifying dependencies as needed
      663│         clean_dependencies = []
      664│         for dep in dependencies:

The following error occurred when trying to handle this error:

  IncompatibleConstraintsError

  Incompatible constraints in requirements of oldest-supported-numpy (2022.11.19):
  numpy (==1.22.2) ; platform_machine == "loongarch64" and python_version < "3.11"
  numpy (==1.23.3) ; python_version == "3.9" and platform_system == "OS400"
  numpy ; python_version >= "3.9" and platform_python_implementation == "PyPy"

  at ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/poetry/puzzle/provider.py:920 in _resolve_overlapping_markers
      916│                     specific_source_dependency = dep
      917│                 constraint = constraint.intersect(dep.constraint)
      918│             if constraint.is_empty():
      919│                 # conflict in overlapping area
    → 920│                 raise IncompatibleConstraintsError(package, *used_dependencies)
      921│ 
      922│             if not any(uses):
      923│                 # This is an edge case where the dependency is not required
      924│                 # for the resulting marker. However, we have to consider it anyway

Cannot install ruptures.

TOML file (doesn't have ruptures since it failed on poetry add ruptures

[tool.poetry]
name = "test-project"
version = "0.1.0"
description = ""
authors = ["test author"]

[tool.poetry.dependencies]
python = "^3.9"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

Current (undesirable) workaround: pip install ruptures first then poetry add ruptures works.

oboulant commented 7 months ago

When you run pip install ruptures, which version of numpy does it install ?

drjct commented 7 months ago

numpy 1.26.2

➜ pip list            
Package    Version
---------- -------
numpy      1.26.2
pip        23.3.1
ruptures   1.1.8
scipy      1.11.4
setuptools 68.2.2
zhenyakovalyov commented 6 months ago

heya @drjct,

❯ pip list
Package  Version
-------- -------
numpy    1.26.3
pip      23.2.1
ruptures 1.1.9
scipy    1.11.4