简体   繁体   English

在 Python 3.6 中导入库“modin”时出错

[英]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我在我的 windows 10 机器中导入 modin.pandas 库但出现错误

"AttributeError: module 'ray' has no attribute 'utils'" “AttributeError:模块'ray'没有属性'utils'”

Anything missed while installing modin library?安装 modin 库时遗漏了什么?

"AttributeError: module 'ray' has no attribute 'utils'" “AttributeError:模块'ray'没有属性'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:看起来,如果您只安装 1.1 版本的 ray,您应该能够通过执行以下操作来解决此问题:

pip install ray==1.1

The modin.pandas creators haven't release support for versions of ray greater then 1.1. modin.pandas 创建者尚未发布对大于 1.1 的 ray 版本的支持。

Here is the discussion thread on github: https://github.com/modin-project/modin/issues/3059这是关于 github 的讨论帖: https://github.com/modin-project/modin/issues/3059

Check which version of ray you have;检查您拥有的ray版本; ray.utils used to be called ray.experimental . ray.utils曾经被称为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) .您要么需要升级您正在使用的将ray作为依赖项的模块版本(意味着该模块当前使用ray的过时版本) ,要么降级ray的版本(兼容您正在使用的模块)

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:对我来说,我从我的实例中卸载了现有的 modin 和 ray package,然后重新启动内核,然后使用以下命令:

pip install modin[ray]

It then worked for me.然后它对我有用。 If you are running it in google Colab you can find more information here .如果您在 google Colab 中运行它,您可以在此处找到更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM