plotly / Kaleido

Fast static image export for web-based visualization libraries with zero dependencies
MIT License
378 stars 38 forks source link

Can't install using poetry on Windows 11 Python 3.11 #176

Open SergeyHein opened 8 months ago

SergeyHein commented 8 months ago

Can't install using poetry on Windows 11 Python 3.11


PS .......> poetry add kaleido 
Using version ^0.2.1.post1 for kaleido

Updating dependencies
Resolving dependencies... (0.5s)

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 ~\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\installation\chooser.py:74 in choose_for
       70│
       71│             links.append(link)
       72│
       73│         if not links:
    →  74│             raise RuntimeError(f"Unable to find installation candidates for {package}")
       75│
       76│         # Get the best link
       77│         chosen = max(links, key=lambda link: self._sort_key(package, link))
       78│

Cannot install kaleido.

.......> 
tvdboom commented 7 months ago

I am having the same issue with pdm

Synchronizing working set with resolved packages: 0 to add, 1 to update, 0 to remove                                                                                                                                                                                                                                  

  ✖ Update kaleido 0.2.1 -> 0.2.1.post1 failed
Retry failed jobs
  ✖ Update kaleido 0.2.1 -> 0.2.1.post1 failed

ERRORS:
update kaleido failed:
Traceback (most recent call last):
  File "C:\Users\Mavs\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Mavs\Documents\Python\ATOM\venv311\Lib\site-packages\pdm\installers\synchronizers.py", line 303, in update_candidate
    self.manager.overwrite(dist, can)
  File "C:\Users\Mavs\Documents\Python\ATOM\venv311\Lib\site-packages\pdm\installers\manager.py", line 55, in overwrite
    installed = self.install(candidate)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Mavs\Documents\Python\ATOM\venv311\Lib\site-packages\pdm\installers\manager.py", line 30, in install
    prepared.get_cached_package(), self.environment, prepared.direct_url(), self.use_install_cache
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Mavs\Documents\Python\ATOM\venv311\Lib\site-packages\pdm\models\candidates.py", line 404, in get_cached_package
    self._obtain(allow_all=False)
  File "C:\Users\Mavs\Documents\Python\ATOM\venv311\Lib\site-packages\pdm\models\candidates.py", line 466, in _obtain
    raise CandidateNotFound(
pdm.exceptions.CandidateNotFound: No candidate is found for `kaleido` that matches the environment or hashes
alexdashkov commented 7 months ago

I have the same problem with poetry on a mac m1 in a debian docker image with python 3.12. However I can install version 0.2.1

gvwilson commented 4 months ago

Thanks for your interest in Kaleido. We are currently working on an overhaul that might address your issue - we hope to have news in a few weeks and will post an update then. Thanks - @gvwilson

zndr27 commented 4 months ago

having the same issue

jonded94 commented 3 months ago

This was because of the way that the release of 0.2.1.post1 was done. The only available wheel (https://pypi.org/project/kaleido/0.2.1.post1/#files) is py2.py3-none-manylinux2014_armv7l compatible, while wheels of all other platforms are in version 0.2.1.

Since the only commit between the two different versions is one enabling ARM builds (https://github.com/plotly/Kaleido/compare/v0.2.1...v0.2.1.post1), why not simply push the 0.2.1 wheels into the 0.2.1.post1 release? With the current way, nobody using poetry (or other package manager with a proper locking mechanism) can use this project in a platform-independent way because, depending on platform, one has to use either one or the other kaleido version. Or better yet, do a proper 0.2.2 release which contains all wheels? This is what basically the entire rest of the Python community is doing. I'm a bit surprised that this can take weeks?

carschandler commented 2 months ago

Also an issue using uv

devnoname120 commented 2 months ago

Just pin the version:

poetry add 'kaleido == 0.2.1'