predict-idlab / plotly-resampler

Visualize large time series data with plotly.py
https://predict-idlab.github.io/plotly-resampler/latest
MIT License
1.03k stars 68 forks source link

Error in the lttbc=0.2.0 dependency. Blocks the installation in openshift #106

Closed thanosam closed 2 years ago

thanosam commented 2 years ago

In my app, when I add the plotly-resampler in my requirements file and I try to deploy it in openshift I receive the following error:

Collecting tenacity>=6.2.0 Downloading http:......../packages/tenacity/8.0.1/tenacity-8.0.1-py3-none-any.whl (24 kB) Collecting lttbc==0.2.0 Downloading http:....../packages/lttbc/0.2.0/lttbc-0.2.0.tar.gz (91 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 91.4/91.4 kB 351.3 MB/s eta 0:00:00 Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'error' error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [6 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-2odxphd1/lttbc_514ddccd4677437fb07b2fbc930424d3/setup.py", line 7, in import numpy ModuleNotFoundError: No module named 'numpy' [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details. error: build error: er.....................

It seems that in setup.py file of the lttbc==0.2.0 is imported the numpy in line 7, something that changed in lttbc==0.2.1. Why in your dependencies exists lttbc==0.2.0 and not lttbc>0.2.0?

jvdd commented 2 years ago

Hi @thanosam

In commit https://github.com/predict-idlab/plotly-resampler/commit/5ed847b8f5572901263c8625bc0fb8ddeb9795d5 @jonasvdd fixated the version on 0.2.0 (perhaps he can explain why?)

However, in PR #103 we added an adapted C implementation of the LTTB algorithm in this repository. As such the lttbc dependency is dropped now. We haven't made a new release yet, but you can try install the pre-release? pip install plotly-resampler==0.8.0rc5

Cheers, Jeroen

jvdd commented 2 years ago

Hi @thanosam, can you confirm that installing the pre-release resolves the issue?

thanosam commented 2 years ago

I didn't install the prerelease yet. Currently I solved it by forcing the installation of numpy in the setup file.

jonasvdd commented 2 years ago

Hi @thanosam,

Have you found time to install the pre-release? (currently the latest is pip install plotly-resampler==0.8.0rc12)

thanosam commented 2 years ago

Hello,

I tried the 0.8.0rc12 and it seems that it works. But since it's prerelease, I install back the 7.2.2 with the setup file solution and I work with this version.

jonasvdd commented 2 years ago

okay, as it seems resolved, I will close this issue for now!