question.it
question.it

Reputation: 2968

Error while importing library "modin" in Python 3.6

import modin.pandas as pd

I am importing modin.pandas library in my windows 10 machine but getting error

"AttributeError: module 'ray' has no attribute 'utils'"

Anything missed while installing modin library?

Upvotes: 7

Views: 2458

Answers (4)

Ramya R
Ramya R

Reputation: 183

I followed the below steps to install Modin using Ray execution engine. Install Modin dependencies and Ray to run on Ray -

pip install modin[ray] 

Also, please customize your Ray environment for use in Modin using the below commands.

import ray
ray.init()
import modin.pandas as pd

Please check out Intel Distribution of Modin (https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-of-modin.html#gs.14j7r0) and Modin official page (https://modin.readthedocs.io/en/stable/) for installation issues and to accelerate pandas workflow on Intel architectures.

Upvotes: 2

Akash Dubey
Akash Dubey

Reputation: 304

"AttributeError: module 'ray' has no attribute 'utils'"

It looks like, you should be able to fix the issue if you just install the 1.1 version of ray, by doing the following :

pip install ray==1.1

The modin.pandas creators haven't release support for versions of ray greater then 1.1.

Here is the discussion thread on github : https://github.com/modin-project/modin/issues/3059

Upvotes: 3

aninda
aninda

Reputation: 31

I also had the same issue. For me I uninstalled the existing modin and ray package from my instance and then restarted the kernal and then used the following command:

pip install modin[ray]

It then worked for me. If you are running it in google Colab you can find more information here.

Upvotes: 0

Red
Red

Reputation: 27567

Check which version of ray you have; ray.utils used to be called ray.experimental.

You'll either need to upgrade version of the module you're using that has ray as a dependency (meaning the module currently uses the out-of-date version of ray), or downgrade the version of the ray (to be compatible with the module you're using).

Upvotes: 1

Related Questions