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

Arctic cannot import Panel from Pandas with newest version of pandas #907

Closed
rva92 opened this issue Jun 10, 2021 · 12 comments
Closed

Arctic cannot import Panel from Pandas with newest version of pandas #907

rva92 opened this issue Jun 10, 2021 · 12 comments

Comments

@rva92
Copy link

rva92 commented Jun 10, 2021

Arctic Version

1.79.3

Arctic Store

VersionStore

Platform and version

Windows 10, python 3.7 (anaconda distribution)

Description of problem and/or code sample that reproduces the issue

After upgrading to the latest pandas version (1.2.4), arctic fails with:

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\rwi\Anaconda3\envs\rvf\lib\site-packages\arctic_init_.py", line 6, in
from .store.pandas_ndarray_store import PandasDataFrameStore, PandasSeriesStore, PandasPanelStore
File "C:\Users\rwi\Anaconda3\envs\rvf\lib\site-packages\arctic\store_pandas_ndarray_store.py", line 6, in
from pandas import DataFrame, Series, Panel
ImportError: cannot import name 'Panel' from 'pandas' (C:\Users\rwi\Anaconda3\envs\rvf\lib\site-packages\pandas_init
.p

I have tried from an empty environment as well, where I only installed arctic and let arctic install pandas, which turned out to be version 1.2.4, hence it still failed.

@chazzmoney
Copy link

Panel has been deprecated since Pandas 0.23. To load a Panel, you will likely need to downgrade to an earlier version of Pandas.

@stefanopalmieri
Copy link

stefanopalmieri commented Jun 28, 2021

The newer versions of Pandas no longer issues a warning for Panel import, as Panel has been fully deprecated.

Release 1.79.x should not have been released without pinning pandas version.

See issues #903, #904

@stefanopalmieri
Copy link

stefanopalmieri commented Jun 28, 2021

If you are using poetry, I suggest you use this github repo to add your arctic dependency, instead of using the release from Pypi, as the pandas version has been pinned in the current master branch. This would be a quick fix to your issue.

poetry add git+https://github.com/man-group/arctic

@closedLoop
Copy link

Any progress on this?

@rva92
Copy link
Author

rva92 commented Aug 27, 2021

Is there any change, that the arctic library in future will not depend on the depreciated panels feature from pandas?

@AlistairHaimes
Copy link

If you need to use a later pandas version than 1.0 (the repository I use doesn't go back that far any longer, with Python 3.9.5 which I need to use for other reasons), I think the latest that currently works (stand to be corrected) is 1.1.5, which will work with Arctic pinned to 1.79.2

i.e.

 pip install pandas==1.1.5
pip install arctic==1.79.2

@agftrading
Copy link

Has there been an update for this yet. I have constraints on my python version and pandas version i.e. downgrading is not possible. Thanks.

@tigerstyle80
Copy link

i noticed that that test-df in the first_lib library that ships with this project is available to read using pandas 1.3.5. However, I did see the import error referred to above when i tried a different dataframe. what needs to happen for arctic to be compatible with pandas 1.3*? I'm seeing ML projects starting to require these later pandas versions...

@dunckerr
Copy link
Contributor

The panel issue has been fixed in more recent releases of arctic. I'm afraid we cannot support all combinations of python/pandas.

@tigerstyle80
Copy link

sounds like downgrading is the only way forward in that case. can't be mad at it as i'm not a contributor. thanks anyway.

@dbrakenhoff
Copy link

Installing arctic from this PR #928 has worked for me with newer versions of pandas (1.5.2) and numpy (1.21.2).
I've only used VersionStore, and its not officially supported so no guarantees... But it is a workaround for getting arctic to work with newer versions of those packages. And you'll have to ignore warnings about package incompatibility in your environment.

@dunckerr
Copy link
Contributor

suppressed Panel FutureWarning

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

9 participants