-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Unable to install plotly-resampler
on some linux distributions
#32
Comments
Hi @Alexander-Serov, I encountered the same error issue on my Linux-distro once I tried to update Plotly-Resampler's Python dependencies to Can you state which lttbc & numpy version you are using? (I think the issue lies in that direction). Best regards, |
Hey @jonasvdd, Thanks for looking into it. Good idea, it may indeed be related to the versions of other packages in the repo. I already had a numpy-related problem on a different package (though I don't insist there is a direct connection). But just in case: louisabraham/pydivsufsort#30 (comment) To answer your specific question, I see the pipelines installing the following versions:
Let me know if you have further questions! |
Hi @Alexander-Serov! In the coming months, we will look into using a new version of the LTTB algorithm! |
Hi @Alexander-Serov, any updates on this? PS: we added an adapted C implementation of LTTB in this repo #103 (hence the lttbc dependency is dropped now) - we did not create a new release yet (but you can try out this prerelease) |
Hey @jvdd , thanks for the update! I will try to find a moment to give it a try in the coming days! |
Hi @Alexander-Serov, Have you already found a moment to try it? |
Hey @jonasvdd, I am really sorry for the delay: I have been busy in July and the holiday season intervened in the testing. In any case, I have finally managed to test the new version and it seems to work great, both locally and on the pipelines! Thanks for the rapid solution to this not-so-simple issue! Amazing. 😀 I can finally remove my try and catch clauses around the plotly-resampler imports.
There is one minor problem though. In one of my test plot functions,
It is as if I was not giving it a go.Figure as input. Weirdly, I only experience it on my Gitlab-CI setup. The same test passes correctly on my Windows machine. 🤔 I am investigating where this comes from. This does not seem to be related to this issue, but to some other changes in 0.8.0. I will let you know if I find anything. P.S. And by the way, it's awesome to have static images in the saved notebooks now! Since I discovered the resampler, it has become my everyday tool. Keep up the good work! |
I seem to be launching the FigureResampler on a figure before it contains any data in it. And this seems to fail the resampler isinstance test. I will try to move resampling to the moment once everything has been drawn. I am sure this worked before (and seems to work on Windows), but maybe something has changed since v0.2.* :) |
Hi @Alexander-Serov, Firstly, thank you for your kind words @jvdd and I really appreciate this! 🤗 I think I found your experienced issue on Windows; you do not seem to have """Utility functions for the figure_resampler submodule."""
import math
import pandas as pd
from plotly.basedatatypes import BaseFigure
try: # Fails when IPywidgets is not installed
from plotly.basewidget import BaseFigureWidget
except (ImportError, ModuleNotFoundError):
BaseFigureWidget = None # <--- this is the bug: we compare with None; must be type(None)
...
def is_figure(figure: Any) -> bool:
return isinstance(figure, BaseFigure) and (not isinstance(figure, BaseFigureWidget)) Which gives the following error when comparing with I will fix this and release a new version later this day. Keep you posted! Thank you so much for pointing out these bugs! |
Hey @jonasvdd, Great, thank you. It's always nice to see a well-maintained repo, you know 😀 So it's in our common interest. I am happy you have found the nature of the bug. Indeed, on my side I have checked since then, whether applying the plotly resampler after the figure has been drawn changes anything and it does not. It still gives the same error And another thing I do not understand is that I use the resampler in 9 plot functions in my notebook and the bug only occurs in one of them. Honestly, I don't see what is different about this particular one. :) But I have a feeling, the solution you suggest will fix this. Will be happy to test a pre-release version if necessary ) |
Hi @Alexander-Serov, feel free to test It is indeed weird that the bug seems non-determenistic, I hope my fix resolved it! 🤞🏼 |
Well, it is weirdly deterministic: it is always the same plot function. There must be something different about it... 🤔. Thanks! |
I confirm, the tests pass! Thanks! But... I still have a problem with the same figure when I launch it in the notebook. All other figures plot correctly and I can wrap And btw, I had |
Hi, I have same problems to download the plotly-resampler library. Could you please tell me which version to use and can be installable? tried both plotly-resampler==0.8.0, plotly-resampler==0.8.1 and even the latest plotly-resampler==0.9.1. but nothing seems to work getting warning related to lltbc library and also error: ImportError: cannot import name 'MedDiffGapHandler' from 'plotly_resampler.aggregation' Thanks! |
I am using
plotly-resampler
, which installs correctly on my local Windows machine and on another Linux machine I have access to (by just usingpip install plotly-resampler
). However, we also runGitlab-CI
tests in a controlled environment and installing withpip
kept failing in that environment. The exact error wasI am posting it here in case it helps other folks who might encounter the same problem.
I have played around with the test environment and was able to install all packages by executing
before the pip command. This allowed me to install the apparently missing linux header,
lttbc
andploty-resampler
. However, for some reason resulted in an incompatibility withnumpy
:So I abandoned.
As I said, I am publishing this info here in case someone stumbles on a similar issue, so feel free to close. However, I saw that
lttbc
is a top-level dependency ofplotly-resampler
and is still in early stages (version <1) and has not been updated since 2020. So there is little chance its python wheels will be changed anytime soon. So I wonder, whether on theplotly-resampler
side we could add atry-except
forlttbc
import and fall back onto another resampler iflttbc
is unavailable for import? Or, perhaps, if you have any idea of how to install thelttbc
dependency withoutgcc
compiling, it would be much appreciated!I understand this is not directly related to
ploty-resampler
. I have thought about posting inlttbc
instead, but the repo does not seem to be actively maintained. Thanks again for theresampler
. Great idea!The text was updated successfully, but these errors were encountered: