question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
neersightedcommented, Oct 4, 2022

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).

1reaction
tmehlingercommented, Oct 6, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Unable to find installation candidates" in poetry trying to ...
It works for most of my dependencies, but fails for the genicam package, with the above Unable to find installation candidates error message ......
Read more >
'python3.8' has no installation candidate - You.com | The AI ...
2-zip' has no installation candidate default: Main packages check and install failed, halting provision The SSH command responded with a non-zero exit status....
Read more >
poetry-core - PyPI
This was inefficient and time consuming when a PEP 517 build was required. For example, both pip and tox (with isolated builds) would...
Read more >
https://www.piwheels.org/logs/0000/0734/3263.txt
... hashes to check 1 links for project 'thirdweb-sdk': discarding no candidates ... temporary directory: /tmp/pip-install-4gmvs1ta 2021-11-09T22:34:06,898 ...
Read more >
Compare Packages Between Distributions - DistroWatch.com
This can let us know which distribution is more up to date, or if a feature has been introduced into ... beforelight 1.0.5...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found