etna-team / etna

ETNA – Time-Series Library
https://etna.tinkoff.ru
Apache License 2.0
99 stars 5 forks source link

Conflict with numpy 2.0.0 version after installation via pip #407

Open ArtemLiA opened 2 weeks ago

ArtemLiA commented 2 weeks ago

🐛 Bug Report

I've installed etna via pip. And when trying to import plot_trend from etna.analysis I got folowing error:

ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Expected behavior

Correct import of any function from the library.

How To Reproduce

  1. Create new python environment
  2. Install etna by !pip install etna
  3. Import plot_trend from etna.analysis

Environment

OS: Windows 11 Python: 3.10.14

Additional context

Probably, the error occurs due to a conflict between numpy 2.0.0 and pandas. After donwgrading numpy to version 1.26.4 error disappears.

Checklist

d-a-bunin commented 1 week ago

Hi! What version of pip do you use? What version of pandas is installed? I'm just thinking is this a problem with pip that it can't properly solve dependencies.

d-a-bunin commented 1 week ago

I confirm that problem

Full list after pip install etna:

antlr4-python3-runtime==4.9.3
boto3==1.34.131
botocore==1.34.131
Bottleneck==1.4.0
catboost==1.2.5
click==8.1.7
contourpy==1.2.1
cycler==0.12.1
Cython==3.0.10
Deprecated==1.2.13
dill==0.3.8
etna==2.7.1
fonttools==4.53.0
graphviz==0.20.3
holidays==0.51
hydra-slayer==0.2.0
jmespath==1.0.1
joblib==1.4.2
kiwisolver==1.4.5
llvmlite==0.43.0
loguru==0.5.3
matplotlib==3.9.0
numba==0.60.0
numpy==2.0.0
omegaconf==2.3.0
packaging==24.1
pandas==1.5.3
patsy==0.5.6
pillow==10.3.0
plotly==5.22.0
pmdarima==2.0.4
pyparsing==3.1.2
python-dateutil==2.9.0.post0
pytz==2024.1
PyYAML==6.0.1
ruptures==1.1.9
s3transfer==0.10.1
scikit-learn==1.5.0
scipy==1.13.1
seaborn==0.13.2
six==1.16.0
statsmodels==0.13.5
tbats==1.1.3
tenacity==8.4.1
threadpoolctl==3.5.0
toml==0.10.2
typer==0.4.2
types-Deprecated==1.2.9
typing_extensions==4.12.2
urllib3==2.2.2
wrapt==1.16.0
d-a-bunin commented 1 week ago

To fix this bug we should probably add an upper bound on numpy version until we make a major release which allows user to install higher versions of pandas.

ArtemLiA commented 1 week ago

Hi! What version of pip do you use? What version of pandas is installed? I'm just thinking is this a problem with pip that it can't properly solve dependencies.

Hi! Here versions of pip and pandas: