Skip to content

does installer.no-binary work? #8030

Closed
Closed
@akcheung

Description

@akcheung
  • I am on the latest stable Poetry version, installed using a recommended method.
    I have searched the issues of this repo and believe that this is not a duplicate.
    I have consulted the FAQ and blog for any relevant entries or release notes.
    If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

I'm trying to install the non binary versions of mypy and matplotlib but ran into a runtime error. I initially set up my config with

poetry config --local installer.no-binary mypy,matplotlib

then when I ran poetry update I got the following output

  • Installing mypy (1.3.0): Pending...
  • Installing mypy (1.3.0): Failed

  Stack trace:

  7  ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/poetry/installation/executor.py:271 in _execute_operation
      269│
      270│             try:
    → 271│                 result = self._do_execute_operation(operation)
      272│             except EnvCommandError as e:
      273│                 if e.e.returncode == -2:

  6  ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/poetry/installation/executor.py:357 in _do_execute_operation
      355│             return 0
      356│
    → 357│         result: int = getattr(self, f"_execute_{method}")(operation)
      358│
      359│         if result != 0:

  5  ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/poetry/installation/executor.py:477 in _execute_install
      475│
      476│     def _execute_install(self, operation: Install | Update) -> int:
    → 477│         status_code = self._install(operation)
      478│
      479│         self._save_url_reference(operation)

  4  ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/poetry/installation/executor.py:515 in _install
      513│             archive = self._download_link(operation, Link(package.source_url))
      514│         else:
    → 515│             archive = self._download(operation)
      516│
      517│         operation_message = self.get_operation_message(operation)

  3  ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/poetry/installation/executor.py:709 in _download
      707│             self._yanked_warnings.append(message)
      708│
    → 709│         return self._download_link(operation, link)
      710│
      711│     def _download_link(self, operation: Install | Update, link: Link) -> Path:

  2  ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/poetry/installation/executor.py:739 in _download_link
      737│             archive = self._chef.prepare(archive, output_dir=output_dir)
      738│
    → 739│         self._populate_hashes_dict(archive, package)
      740│
      741│         return archive

  1  ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/poetry/installation/executor.py:745 in _populate_hashes_dict
      743│     def _populate_hashes_dict(self, archive: Path, package: Package) -> None:
      744│         if package.files and archive.name in {f["file"] for f in package.files}:
    → 745│             archive_hash = self._validate_archive_hash(archive, package)
      746│             self._hashes[package.name] = archive_hash
      747│

  RuntimeError

  Hash for mypy (1.3.0) from archive mypy-1.3.0-py3-none-any.whl not found in known hashes (was: sha256:40e62b619b08c1cc07bbc309ca3e44f1061e2849b2bf34b1d0da6ac4e7f6dacd)

  at ~/Library/Application Support/pypoetry/venv/lib/python3.8/site-packages/poetry/installation/executor.py:754 in _validate_archive_hash
      750│         archive_hash: str = "sha256:" + get_file_hash(archive)
      751│         known_hashes = {f["hash"] for f in package.files}
      752│
      753│         if archive_hash not in known_hashes:
    → 754│             raise RuntimeError(
      755│                 f"Hash for {package} from archive {archive.name} not found in"
      756│                 f" known hashes (was: {archive_hash})"
      757│             )
      758│

and similarly for matplotlib. Did I set up my config incorrectly?

Activity

added
kind/bugSomething isn't working as expected
status/triageThis issue needs to be triaged
on May 28, 2023
dimbleby

dimbleby commented on May 28, 2023

@dimbleby
Contributor

You have checked "I am on the latest poetry version", while reporting that you are on an old poetry version.

This looks duplicate #7594

akcheung

akcheung commented on May 29, 2023

@akcheung
Author

Indeed. Updating to the latest version solves the issue. Thanks!

github-actions

github-actions commented on Feb 29, 2024

@github-actions

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.

locked as resolved and limited conversation to collaborators on Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expectedstatus/triageThis issue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      does `installer.no-binary` work? · Issue #8030 · python-poetry/poetry