Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/poetry/installation/chooser.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ def _no_links_found_error(
f"Make sure the lockfile is up-to-date. You can try one of the following;\n\n"
f" 1. <b>Regenerate lockfile: </><fg=yellow>poetry lock --no-cache --regenerate</>\n"
f" 2. <b>Update package : </><fg=yellow>poetry update --no-cache {package.name}</>\n\n"
# FIXME: In the future, it would be better to suggest a more targeted
# cache clear command for just the package in question. E.g.
# `poetry cache clear {package.source_reference}:{package.name}:{package.version}`
# but `package.source_reference` currently resolves to `None` because
# repository names are case sensitive at the moment (`PyPI` vs `pypi`).
f"If any of those solutions worked, you will have to clear your caches using (<c1>poetry cache clear --all</>).\n\n"
f"If neither works, please first check to verify that the {package.name} has published wheels "
f"available from your configured source{source_hint} that are compatible with your environment"
f"- ie. operating system, architecture (x86_64, arm64 etc.), python interpreter."
Expand Down
4 changes: 4 additions & 0 deletions tests/installation/test_chooser_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def test_chooser_no_links_found_error(env: MockEnv, pool: RepositoryPool) -> Non
1. Regenerate lockfile: poetry lock --no-cache --regenerate
2. Update package : poetry update --no-cache {package.name}

If any of those solutions worked, you will have to clear your caches using (poetry cache clear --all).

If neither works, please first check to verify that the {package.name} has published wheels available from your configured \
source ({package.source_reference}) that are compatible with your environment- ie. operating system, architecture \
(x86_64, arm64 etc.), python interpreter.\
Expand All @@ -81,6 +83,8 @@ def test_chooser_no_links_found_error(env: MockEnv, pool: RepositoryPool) -> Non
1. Regenerate lockfile: poetry lock --no-cache --regenerate
2. Update package : poetry update --no-cache {package.name}

If any of those solutions worked, you will have to clear your caches using (poetry cache clear --all).

If neither works, please first check to verify that the {package.name} has published wheels available from your configured \
source ({package.source_reference}) that are compatible with your environment- ie. operating system, architecture \
(x86_64, arm64 etc.), python interpreter.
Expand Down