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

Fix poetry install #33

Merged
merged 1 commit into from
May 15, 2024
Merged

Conversation

kazunaritakeichi
Copy link
Contributor

Solved the following error that occured with poetry install.

environment

  • poetry: 1.7.0
  • python: 3.8.7
  • ubuntu: 18.04

pyproject.toml

[tool.poetry.dependencies]
python = "^3.8"
ctc-segmentation = "1.7.4"

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

error

Installing dependencies from lock file

Package operations: 0 installs, 1 update, 0 removals

  • Updating ctc-segmentation (1.7.4 cf0c13e -> 1.7.4): 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.19.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.17.3)>}}, {Package('oldest-supported-numpy', '2023.10.25'): {'numpy': <Dependency numpy (==1.17.5)>}}, {Package('oldest-supported-numpy', '2023.10.25'): {'numpy': <Dependency numpy (<empty>)>}})

  at ~/.local/share/pypoetry/venv/lib/python3.8/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.22.2)>}, Package('oldest-supported-numpy', '2023.8.3'): {'numpy': <Dependency numpy (==1.22.2)>}}

  at ~/.local/share/pypoetry/venv/lib/python3.8/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" or python_version == "3.8" and platform_python_implementation == "PyPy"
  numpy (==1.21.0) ; python_version == "3.8" and platform_machine == "arm64" and platform_system == "Darwin"

  at ~/.local/share/pypoetry/venv/lib/python3.8/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 ctc-segmentation.

@lumaku
Copy link
Owner

lumaku commented Dec 4, 2023

@kazunaritakeichi Thank you for the pull request!
Did you install the package from the Github URL or from PyPI?

I am not yet sure whether this change is fully compatible with other installations... I will do some tests on my system before merging.

@kazunaritakeichi
Copy link
Contributor Author

@lumaku Thank you for your reply.

I specify the version like ctc-segmentation = "1.7.4" in pyproject.toml.
So, I think the package is installed from PyPl.

poetry.lock is like below.

[[package]]
name = "ctc-segmentation"
version = "1.7.4"
description = "CTC segmentation to align utterances within large audio files."
optional = false
python-versions = ">=3.6"
files = [
    {file = "ctc_segmentation-1.7.4.tar.gz", hash = "sha256:19d383ea5f22438ebb1699d72b22078b63f351a33fa50bedb19c14077ba6a116"},
]

@lumaku lumaku merged commit a30080a into lumaku:master May 15, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants