poetry-core 1.0.5 fails to find installation candidate
See original GitHub issue-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option). -
OS version and name: RHEL 7, CentOS 7, and others
-
Poetry version: 1.1.4, 1.1.8, 1.1.9
Issue
Upon upgrading to poetry 1.1.9, I observed that I could no longer install a specific package in some of my projects. The package exists in two places - pypi.org, and an internal repo (running Nexus). In both places, the package is identical (i.e. same hash). Both pypi.org (as a default) and my internal repo (via configuration in pyproject.toml) is available for these projects.
When I try to install, I get the following:
Unable to find installation candidates for kerberos (1.3.1)
at ~/.local/pipx/venvs/poetry/lib/python3.8/site-packages/poetry/installation/chooser.py:72 in choose_for
68│
69│ links.append(link)
70│
71│ if not links:
→ 72│ raise RuntimeError(
73│ "Unable to find installation candidates for {}".format(package)
74│ )
75│
76│ # Get the best link
The relevant parts of poetry.lock
are:
[[package]]
name = "kerberos"
version = "1.3.1"
description = "Kerberos high-level interface"
category = "main"
optional = false
python-versions = "*"
[package.source]
type = "legacy"
url = "<url-to-internal-repo>"
reference = "<name-of-internal-repo>"
and
[
{file = "kerberos-1.3.1-cp38-cp38-macosx_10_15_x86_64.whl", hash = "md5:813b4beec4a4641d7772346d2b6485d8"},
{file = "kerberos-1.3.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "md5:255c2409de0795669030bbc1e78ac462"},
]
(interestingly, in that second section, the two entries are not relevant to my platform/python version. Other entries exist on both pypi.org and my internal repo)
After noticing these failures with 1.1.9, I downgraded to 1.1.8, and eventually back to the last-known-good 1.1.4. The problem continued to occur. Once I downgraded poetry-core from 1.0.5 to 1.0.4, the issue resolved (with both poetry 1.1.4 and 1.1.9).
This looks vaguely familiar to other issues like https://github.com/python-poetry/poetry/issues/3456, and I also encountered something that looks like https://github.com/python-poetry/poetry/issues/4523 today while debugging, but I think those issues are distinct from this specific problem.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:9 (3 by maintainers)
Closing this as there have been no reports recently of anything related, and there was not a reproduction in this issue. If you’re running into something similar, please open a new issue after troubleshooting as much as you can (and consider reaching on Discord if you need help troubleshooting).
We just ran into this on my team.
For us, the problem was one of our teammates had an older version of Poetry installed (1.0.5) and generated a lockfile. When we tried to install dependencies in a Docker image with Poetry 1.1.8, it failed with the stack trace given in the original report above. Regenerating the lock file with 1.1.8 resolved the problem.