-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
"Unable to find installation candidates for" for packages that are already installed #4679
Comments
Why is this even trying to update anything?
|
I am seeing a similar problem poetry update
Creating virtualenv ocr in /Users/ggao/github/MONOREPO/libs/ocr/.venv
Updating dependencies
Resolving dependencies... (0.2s)
Package operations: 31 installs, 0 updates, 0 removals
• Installing protobuf (3.20.1): Failed
RuntimeError
Unable to find installation candidates for protobuf (3.20.1)
at ~/.poetry/lib/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
• Installing pyasn1 (0.4.8)
• Installing six (1.16.0) protobuf is already installed
btw, the problem occurred when first I try to run |
@felixgao |
yea I tried to manually install it with pip but I guess i used the wrong pip.
then
edit: Here is using the correct pip to try to install the package
|
another update, I think the problem is with poetry cache. Once I cleared the cache, everything seems to work now. |
This seems indeed to be solved. Here's the test I performed.
Running I'm closing this. If you think the latest Poetry version still doesn't work for you, please comment and we'll consider re-opening. |
When trying to install env: Steps to reproduce:
[tool.poetry]
name = "test"
version = "0.1.0"
description = ""
authors = ["Charlie Brown"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.12"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
(test-py3.12) D:\Github\c>poetry add textual
Using version ^0.38.1 for textual
Updating dependencies
Resolving dependencies...
Package operations: 2 installs, 0 updates, 0 removals
• Installing tree-sitter-languages (1.7.0)
RuntimeError
Unable to find installation candidates for tree-sitter-languages (1.7.0)
at ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\poetry\installation\chooser.py:73 in choose_for
69│
70│ links.append(link)
71│
72│ if not links:
→ 73│ raise RuntimeError(f"Unable to find installation candidates for {package}")
74│
75│ # Get the best link
76│ chosen = max(links, key=lambda link: self._sort_key(package, link))
77│
|
@cntvc the package that is failing to be installed is tree-sitter-languages, not textual. If you go to tree-sitter-languages pypi page, you'll see they don't support source wheels (for whatever reason, whatever reasons they are, I would suggest they are silly reasons) and they don't have any python 3.12 wheels. Furthermore, this is a very different bug to the title of the bug. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
If a package is already installed at a specific version Poetry should not fail with "Unable to find installation candidates for" as long as the local version matches the requirements.
We're using a package,
oso
, which does not currently have an ARM build for linux. It also does not provide a source via pip, as it requires a somewhat complicated build chain. We are building this package locally and installing it directly into the environment, at the appropriate version.Unfortunately Poetry is still looking to pull the package from somewhere, which in turn causes our install to fail.
The text was updated successfully, but these errors were encountered: