← All tasks
pythonOpenNMT/CTranslate2 #1070Not a task: not reproduced

Cant install ctranslate2 with either poetry or pdm

envgap__OpenNMT__CTranslate2-1070

01 / FAILURE SIGNATURE

As reported upstream

pdm.exceptions.CandidateNotFound: No candidate is found for `ctranslate2` that matches the environment or hashes
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
67800d5c775a564852b97e888fed737d0374f7bd
Manifest
python/setup.py
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

OpenNMT/CTranslate2 #1070 · read the original issue
With PDM I get this error - it seems to be trying to install v1.20.1. 

```

Adding packages to default dependencies: ctranslate2

🔒 Lock successful

Changes are written to pdm.lock.

Changes are written to pyproject.toml.

Synchronizing working set with lock file: 1 to add, 0 to update, 0 to remove



  ✖ Install ctranslate2 1.20.1 failed

Retry failed jobs

  ✖ Install ctranslate2 1.20.1 failed



ERRORS:

add ctranslate2 failed:

Traceback (most recent call last):

  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run

    result = self.fn(*self.args, **self.kwargs)

  File "/home/nick/.local/share/pdm/venv/lib/python3.10/site-packages/pdm/installers/synchronizers.py", line 236, in install_candidate

    self.manager.install(can)

  File "/home/nick/.local/share/pdm/venv/lib/python3.10/site-packages/pdm/installers/manager.py", line 39, in install

    installer(str(prepared.build()), self.environment, prepared.direct_url())

  File "/home/nick/.local/share/pdm/venv/lib/python3.10/site-packages/pdm/models/candidates.py", line 363, in build

    self.obtain(allow_all=False)

  File "/home/nick/.local/share/pdm/venv/lib/python3.10/site-packages/pdm/models/candidates.py", line 415, in obtain

    raise CandidateNotFound(

pdm.exceptions.CandidateNotFound: No candidate is found for `ctranslate2` that matches the environment or hashes

```



If I specify 3.4.0 in the pyproject.toml, it says this:

```

Updating the lock file...

🔒 Lock failed

Unable to find a resolution because the following dependencies don't work on all Python versions defined by the project's `requires-python`: >=3.10.

  python>=3.7,<3.12 (from <Candidate ctranslate2@3.4.0 from https://pypi.org/simple/ctranslate2/>)

To fix this, you can change the value of `requires-python` in pyproject.toml.

See /home/nick/tmp/pdm-lock-m31emvfc.log for detailed debug log.

[ResolutionImpossible]: Unable to find a resolution

```

and the relevant part of that error log is

```

  python>=3.7,<3.12 (from ctranslate2@3.4.0)

pdm.termui: Error occurs

Traceback (most recent call last):

  File "/home/nick/.local/share/pdm/venv/lib/python3.10/site-packages/pdm/termui.py", line 240, in logging

    yield logger

  File "/home/nick/.local/share/pdm/venv/lib/python3.10/site-packages/pdm/cli/actions.py", line 117, in do_lock

    raise ResolutionImpossible("Unable to find a resolution") from None

resolvelib.resolvers.ResolutionImpossible: Unable to find a resolution

```



With Poetry I get:

```

sing version ^3.4.0 for ctranslate2



Updating dependencies

Resolving dependencies... (0.0s)



The current project's Python requirement (>=3.10,<4.0) is not compatible with some of the required packages Python requirement:

  - ctranslate2 requires Python >=3.7,<3.12, so it will not be satisfied for Python >=3.12,<4.0



Because no versions of ctranslate2 match >3.4.0,<4.0.0

 and ctranslate2 (3.4.0) requires Python >=3.7,<3.12, ctranslate2 is forbidden.

So, because zxcv depends on ctranslate2 (^3.4.0), version solving failed.



  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties

    

    For ctranslate2, a possible solution would be to set the `python` property to ">=3.10,<3.12"



    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,

    https://python-poetry.org/docs/dependency-specification/#using-environment-markers

```



However, `pip install ctranslate2` works just fine.



It seems like something within the build requirements is misconfigured, such that those tools aren't able to properly parse it all
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]