1

I am run poetry in a conda environment on a Mac. When I try to install psutil with poetry, the process works for version "5.9.2" and "5.9.3" but not for "5.9.4" (the latest at writing).

-------------------------------------------------------------------------------------
poetry add psutil=="5.9.2"

Updating dependencies
Resolving dependencies... (0.1s)

Writing lock file

Package operations: 0 installs, 1 update, 0 removals

  • Updating psutil (5.9.3 -> 5.9.2)


-------------------------------------------------------------------------------------
poetry add psutil=="5.9.3"

Updating dependencies
Resolving dependencies... (0.1s)

Writing lock file

Package operations: 0 installs, 1 update, 0 removals

  • Updating psutil (5.9.2 -> 5.9.3)



-------------------------------------------------------------------------------------
poetry add psutil=="5.9.4"

Updating dependencies
Resolving dependencies... (0.1s)

Writing lock file

Package operations: 0 installs, 1 update, 0 removals

  • Updating psutil (5.9.3 -> 5.9.4): Failed

  RuntimeError

  Unable to find installation candidates for psutil (5.9.4)

  at ~/miniconda3/envs/<mycondaenv>/lib/python3.9/site-packages/poetry/installation/chooser.py:103 in choose_for
       99│
      100│             links.append(link)
      101│
      102│         if not links:
    → 103│             raise RuntimeError(f"Unable to find installation candidates for {package}")
      104│
      105│         # Get the best link
      106│         chosen = max(links, key=lambda link: self._sort_key(package, link))
      107│

this question is related, but not the same as:

The issue seems to be related to the fact that poetry thinks that the sha256 checksum for, psutil-5.9.4-cp38-abi3-macosx_11_0_arm64.whl does not match the expected value:

  • Installing psutil (5.9.4): Pending...
[keyring.backend] Loading KWallet
[keyring.backend] Loading SecretService
[keyring.backend] Loading Windows
[keyring.backend] Loading chainer
[keyring.backend] Loading libsecret
[keyring.backend] Loading macOS
Creating new session for pypi.org
Skipping psutil-5.9.4-cp36-abi3-win32.whl as sha256 checksum does not match expected value
Skipping psutil-5.9.4-cp36-abi3-win_amd64.whl as sha256 checksum does not match expected value
Skipping psutil-5.9.4-cp38-abi3-macosx_11_0_arm64.whl as sha256 checksum does not match expected value
Skipping psutil-5.9.4.tar.gz as sha256 checksum does not match expected value
Skipping wheel psutil-5.9.4-cp27-cp27m-macosx_10_9_x86_64.whl as this is not supported by the current environment
Skipping wheel psutil-5.9.4-cp27-cp27m-manylinux2010_i686.whl as this is not supported by the current environment
Skipping wheel psutil-5.9.4-cp27-cp27m-manylinux2010_x86_64.whl as this is not supported by the current environment
Skipping wheel psutil-5.9.4-cp27-cp27mu-manylinux2010_i686.whl as this is not supported by the current environment
Skipping wheel psutil-5.9.4-cp27-cp27mu-manylinux2010_x86_64.whl as this is not supported by the current environment
Skipping wheel psutil-5.9.4-cp27-cp27m-win32.whl as this is not supported by the current environment
Skipping wheel psutil-5.9.4-cp27-cp27m-win_amd64.whl as this is not supported by the current environment
Skipping wheel psutil-5.9.4-cp36-abi3-macosx_10_9_x86_64.whl as this is not supported by the current environment
Skipping wheel psutil-5.9.4-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl as this is not supported by the current environment
Skipping wheel psutil-5.9.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment
.
.
.
  RuntimeError

  Unable to find installation candidates for psutil (5.9.4)
tipanverella
  • 3,477
  • 3
  • 25
  • 41
  • I am happy to close this question, if I get the answer from somewhere else. I don't mind down votes, but I find they are helpful only when they come with a comment. – tipanverella Dec 03 '22 at 18:04
  • 1
    Sometimes this happens because Poetry has cached version information and does not check PyPi for a new release. [The easiest workaround for this is to recreate the Poetry environment](https://stackoverflow.com/questions/70064449/how-to-rebuild-poetry-environment-from-scratch-and-force-reinstall-everything?noredirect=1&lq=1). – Mikko Ohtamaa Dec 05 '22 at 19:21
  • @neersighted from github provided [the answer](https://github.com/python-poetry/poetry/issues/7298). – tipanverella Jan 04 '23 at 15:46

0 Answers0