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

Pandas error while trying to run shadems on ilifu #111

Open
KshitijT opened this issue Apr 11, 2023 · 13 comments
Open

Pandas error while trying to run shadems on ilifu #111

KshitijT opened this issue Apr 11, 2023 · 13 comments

Comments

@KshitijT
Copy link

I am getting this error while trying to run shadems installed in a virtualenvironment in ilifu:

Traceback (most recent call last): File "/idia/users/kshitij/shadems_venv3/bin/shadems", line 6, in <module> from shade_ms import main File "/idia/users/kshitij/shadems_venv3/lib/python3.8/site-packages/shade_ms/main.py", line 25, in <module> from . import data_plots, data_mappers File "/idia/users/kshitij/shadems_venv3/lib/python3.8/site-packages/shade_ms/data_plots.py", line 10, in <module> import dask.dataframe as dask_df File "/idia/users/kshitij/shadems_venv3/lib/python3.8/site-packages/dask/dataframe/__init__.py", line 4, in <module> from dask.dataframe import backends, dispatch, rolling File "/idia/users/kshitij/shadems_venv3/lib/python3.8/site-packages/dask/dataframe/backends.py", line 22, in <module> from dask.dataframe.core import DataFrame, Index, Scalar, Series, _Frame File "/idia/users/kshitij/shadems_venv3/lib/python3.8/site-packages/dask/dataframe/core.py", line 35, in <module> from dask.dataframe import methods File "/idia/users/kshitij/shadems_venv3/lib/python3.8/site-packages/dask/dataframe/methods.py", line 22, in <module> from dask.dataframe.utils import is_dataframe_like, is_index_like, is_series_like File "/idia/users/kshitij/shadems_venv3/lib/python3.8/site-packages/dask/dataframe/utils.py", line 19, in <module> from dask.dataframe import ( # noqa: F401 register pandas extension types File "/idia/users/kshitij/shadems_venv3/lib/python3.8/site-packages/dask/dataframe/_dtypes.py", line 4, in <module> from dask.dataframe.extensions import make_array_nonempty, make_scalar File "/idia/users/kshitij/shadems_venv3/lib/python3.8/site-packages/dask/dataframe/extensions.py", line 6, in <module> from dask.dataframe.accessor import ( File "/idia/users/kshitij/shadems_venv3/lib/python3.8/site-packages/dask/dataframe/accessor.py", line 190, in <module> class StringAccessor(Accessor): File "/idia/users/kshitij/shadems_venv3/lib/python3.8/site-packages/dask/dataframe/accessor.py", line 276, in StringAccessor pd.core.strings.StringMethods, AttributeError: module 'pandas.core.strings' has no attribute 'StringMethods'

Probably something to do with nocoffeebrain, but I can't figure out where the error is coming from; the Shadems installed via CARACal works fine when running the pipeline. In the above instance, shadems was installed simply with pip install shadems.

@o-smirnov
Copy link
Collaborator

Most likely a newer version of pandas has broken something in the API. Could you try pip installing a few older versions of pandas into the same venv to see if that resolves the problem?

@KshitijT
Copy link
Author

Pandas are being evil with version 0.5.0 too....

@hrkloeck
Copy link

Hi both I'm running into the same problem, so what kind of steps are needed to get it properly installed.

@KshitijT
Copy link
Author

Hi both I'm running into the same problem, so what kind of steps are needed to get it properly installed.

I still haven't been able to resolve this, but the CARACal shadems works fine, so if you have CARACal installed in a virtualenv, perhaps you could use that version instead?

@hrkloeck
Copy link

hrkloeck commented Apr 28, 2023 via email

@IanHeywood
Copy link
Collaborator

IanHeywood commented Apr 28, 2023 via email

@hrkloeck
Copy link

hrkloeck commented Apr 28, 2023 via email

@Athanaseus
Copy link
Member

Hi @hrkloeck, can you please try: pip install shadems -U
Made some updates to the dependency list.

@hrkloeck
Copy link

hrkloeck commented May 2, 2023

Hi Athanaseus,

I have tried to install it on a singularity ubuntu 20.04

and shadems -h produced the following

pkg_resources.ContextualVersionConflict: (xarray 2023.1.0 (/usr/local/lib/python3.8/dist-packages), Requirement.parse('xarray<2023.0.0,>=2022.6.0; extra == "xarray" or extra == "complete"'), {'dask-ms'})

@Athanaseus
Copy link
Member

Does it help to create a new virtual environment?
Also, did you get any warning while installing?

@IanHeywood
Copy link
Collaborator

Also @hrkloeck are you installing anything else that has a dask-ms dependency in the same container recipe? I've run into this issue often where two things in the same container have different dependency versions, and the installation of one breaks the other.

@hrkloeck
Copy link

hrkloeck commented May 2, 2023 via email

@hrkloeck
Copy link

hrkloeck commented May 2, 2023

Dear all, thanks for the feedback. I could sort it out.

These are the lines I need to place as early as possible within the singularity file

pip3 install xarray==2022.6.0
pip3 install dask-ms[xarray]
pip3 install shadems -U

Cheers, Hans

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

5 participants