ctr
ctr

Reputation: 113

How to add kaleido package to poetry.lock file?

When attempting to install "kaleido" via Poetry, I receive the following error message:

~ poetry add kaleido
Using version ^0.2.1 for kaleido

Updating dependencies
Resolving dependencies... (3.1s)

Package operations: 1 install, 0 updates, 0 removals

  • Installing kaleido (0.2.1.post1): Failed

  RuntimeError

  Unable to find installation candidates for kaleido (0.2.1.post1)

  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

However, the "kaleido" appears in the poetry.lock file:

[[package]]
name = "kaleido"
version = "0.2.1.post1"
description = "Static image export for web-based visualization libraries with zero dependencies"
category = "main"
optional = false
python-versions = "*"

If I try to export an image, I unsurprisingly receive the following error message:

ValueError: 
Image export using the "kaleido" engine requires the kaleido package,
which can be installed using pip:
    $ pip install -U kaleido

Does anyone know how to install this package via poetry (or amend the .lock file to do it manually)?

Upvotes: 11

Views: 5977

Answers (1)

Konstantin Mokhov
Konstantin Mokhov

Reputation: 672

Firstly try to use a master version of poetry as advised in Github issue

or upgrade it to the latest version

pip3 install --upgrade poetry

Then try to install with kaleido with locked version:

poetry add kaleido==0.2.1

That worked in my case.

Upvotes: 30

Related Questions