Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem downloading kaleido #230

Open
ayjayt opened this issue Nov 22, 2024 · 6 comments
Open

Problem downloading kaleido #230

ayjayt opened this issue Nov 22, 2024 · 6 comments

Comments

@ayjayt
Copy link
Collaborator

ayjayt commented Nov 22, 2024

I'm using plotly==5.24.1 and have faced the same issue. Add to this that simply putting kaleido in requirements.txt does not solve the problem as follows:

ERROR: Ignored the following yanked versions: 0.4.0, 0.4.1, 0.4.2
ERROR: Could not find a version that satisfies the requirement kaleido (from versions: 0.4.0rc1, 0.4.0rc2, 0.4.0rc3, 0.4.0rc4, 0.4.0rc5, 1.0.0rc0)
ERROR: No matching distribution found for kaleido

Originally posted by @obarbachan in #210

@obarachan,

Plotly is making a decision on how best to release the new version given the dependency changes. From the output you posted, I am not sure where the kaleido requirement is specified but there are versions available: https://pypi.org/project/kaleido/#history

@ndrezn @gvwilson - do you two know if anyone at plotly changed plolty.py or something to require the new version of kaleido? Because if not, @obarachan, is there something on your end requiring a yanked version of kaleido? Is something pinned?

@gvwilson
Copy link
Collaborator

We yanked the 0.4.0-0.4.2 releases in favor of 1.0.0rc0, but haven't changed anything in plotly.py's dependencies (there hasn't been a release of plotly.py since 2024-09-12, which is well before the 0.4.x kaleido releases briefly existed).

@ndrezn
Copy link
Member

ndrezn commented Nov 22, 2024

I'm not able to reproduce this issue. From the traceback pip is only finding prerelease versions, so I wonder if a flag is being set mistakenly? @obarbachan, could you share if you have any more context? What is the complete environment are you installing this into (pip freeze)?

@obarbachan
Copy link

Well I'll try to follow my steps:
While using plotly to write an image (fig.write_image()) there was an error. Plotly was trying to use kaleido and it was not installed. So I went to my requirements.txt and added 'kaleido' to it.
The system I'm working on is a dockerized python (3.12-alpine) environment. The logs you've seen are from docker compose. Once I locked kaleido==0.4.0rc5 it builds.

Then plotly asks for psutil (which I install through requirements) and it builds. Then I wasn't able to write the image given that a BrowserError is thrown.

If something is missing please let me know.

@ndrezn
Copy link
Member

ndrezn commented Nov 22, 2024

What are the rest of your requirements?

@obarbachan
Copy link

I'm not sure if I could disclose all of it. Is a Django website. But directly related to plotly there is:
plotly==5.24.1
pandas==2.1.4
statsmodels==0.14.4
kaleido==0.4.0rc5
psutil==6.1.0

@ndrezn
Copy link
Member

ndrezn commented Nov 22, 2024

Hm, I'm unable to reproduce with those requirements and an un-pinned Kaleido. Pip is able to resolve the dependencies and picks kaleido==0.2.1.

Installing collected packages: pytz, kaleido, tzdata, tenacity, six, psutil, packaging, numpy, scipy, python-dateutil, plotly, patsy, pandas, statsmodels
Successfully installed kaleido-0.2.1 numpy-1.26.4 packaging-24.2 pandas-2.1.4 patsy-1.0.1 plotly-5.24.1 psutil-6.1.0 python-dateutil-2.9.0.post0 pytz-2024.2 scipy-1.13.1 six-1.16.0 statsmodels-0.14.4 tenacity-9.0.0 tzdata-2024.2
 ➜ python
Python 3.9.6 (default, Oct  4 2024, 08:01:31) 
[Clang 16.0.0 (clang-1600.0.26.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import plotly.express as px
>>> fig = px.line(x=[1,2,3], y=[4,2,3])
>>> fig.write_image("image.png")

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants