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.

Unable to find installation candidates (protobuf), but can install via pip

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. (similar issues found, but which are supposed to be solved)

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: macOS 12.3.1 (Darwin Kernel Version 21.4.0)

  • Poetry version: 1.1.13

  • Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/esciara/857729c278b4de37a6da82e7f62b0a3f

Issue

Same kind of issue than #3621 . All other related issue I found where closed with a fix supposedly in place.

Running a poetry install with the pyproject.toml file in the gist reproduces the problem. Installation works fine with a pip install protobuf.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
abncommented, Apr 28, 2022

The reason why no wheel was found during install was because the protobuf-3.20.1-py2.py3-none-any.whl was skipped because of missing hash in the lock file.

1reaction
esciaracommented, Apr 28, 2022

Seen with @abn : it was a cache issue that has been resolved by:

  • clearing the cache by running the following:
    poetry cache clear --all pypi
    poetry cache clear --all PyPI
    
  • deleting the poetry.lock file
  • running another poetry install

Here is the sequence of what might have happened:

  1. Bad cache for whatever reason
  2. Lockfile lists the old set of hashes from the cache for protobuf.
  3. Installer does not find the hash and skips over the link for universal wheel.
  4. Since no compatible wheel remained install failed.

It is to be noted that the first time this happened, protobuf 3.20.1 was only 12 hours old. Has the library been republished with the same version? The cache is probably not invalidated in this scenario. @abn wonders whethere Poetry should use the serial value from PyPI to invalidate artifact caches.

@abn feel free to comment or to ask to correct.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Unable to find installation candidates" in poetry trying to ...
Installing that package with pip does work. How do I debug such issues? I tried running poetry install -vvv , but all I...
Read more >
Install OR-Tools | Google Developers
Python. The easiest way to install OR-Tools for Python is from the command line, as shown above. However, if you prefer, you can...
Read more >
TensorFlow - Download and Setup - Google Git
Installing from sources: Install TensorFlow by building a pip wheel that you ... TensorFlow and protobuf using pip uninstall first to make sure...
Read more >
Installing BTCRecover - Read the Docs
There are a few basic steps to installing BTCRecover. 1) Download and unzip the BTCRecover script. 2) Download and install Python3. 3) Install...
Read more >
grpcio-tools - PyPI
Installing From PyPI ... Windows users may need to invoke pip.exe from a command line ran as administrator. n.b. On Windows and on...
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