在Linux(CentOS)中安装Modin Pandas。

huangapple go评论100阅读模式
英文:

Installing Modin Pandas in Linux (CentOS)

问题

我正在尝试在运行Linux的共享计算机上安装Modin,我可以访问终端和Jupyter。我在Conda中创建了一个虚拟环境,并按照Modin官方文档中提到的步骤进行了操作。但是,当我尝试在JupyterLab环境中导入Modin时,出现了以下错误:

错误:

2023-07-16 20:42:07,599	ERROR services.py:1169 -- Failed to start the dashboard , return code 1
2023-07-16 20:42:07,602	ERROR services.py:1194 -- Error should be written to 'dashboard.log' or 'dashboard.err'. We are printing the last 20 lines for you. See 'https://docs.ray.io/en/master/ray-observability/ray-logging.html#logging-directory-structure' to find where the log file is.
2023-07-16 20:42:07,604	ERROR services.py:1238 -- 
The last 20 lines of /tmp/ray/session_2023-07-16_20-42-04_202116_30517/logs/dashboard.log (it contains the error message from the dashboard): 
  File "/home/verma.shi/.conda/envs/large/lib/python3.9/site-packages/ray/dashboard/head.py", line 204, in _load_modules
    head_cls_list = dashboard_utils.get_all_modules(DashboardHeadModule)
  File "/home/verma.shi/.conda/envs/large/lib/python3.9/site-packages/ray/dashboard/utils.py", line 121, in get_all_modules
    importlib.import_module(name)
  File "/home/verma.shi/.conda/envs/large/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/home/verma.shi/.conda/envs/large/lib/python3.9/site-packages/ray/dashboard/modules/job/cli.py", line 14, in <module>
    from ray.job_submission import JobStatus, JobSubmissionClient
  File "/home/verma.shi/.conda/envs/large/lib/python3.9/site-packages/ray/job_submission/__init__.py", line 2, in <module>
    from ray.dashboard.modules.job.pydantic_models import DriverInfo, JobDetails, JobType
  File "/home/verma.shi/.conda/envs/large/lib/python3.9/site-packages/ray/dashboard/modules/job/pydantic_models.py", line 4, in <module>
    from pydantic import BaseModel, Field
ImportError: cannot import name 'Field' from 'pydantic' (/home/verma.shi/.conda/envs/large/lib/python3.9/site-packages/pydantic/__init__.py)
2023-07-16 20:42:07,753	INFO worker.py:1553 -- Started a local Ray instance.
Ray
Python version:	3.9.16
Ray version:	2.3.0
(raylet) [2023-07-16 20:42:09,476 E 31350 31408] (raylet) agent_manager.cc:135: The raylet exited immediately because the Ray agent failed. The raylet fate shares with the agent. This can happen because the Ray agent was unexpectedly killed or failed. Agent can fail when
(raylet) - The version of `grpcio` doesn't follow Ray's requirement. Agent can segfault with the incorrect `grpcio` version. Check the grpcio version `pip freeze | grep grpcio`.
(raylet) - The agent failed to start because of unexpected error or port conflict. Read the log `cat /tmp/ray/session_latest/dashboard_agent.log`. You can find the log file structure here https://docs.ray.io/en/master/ray-observability/ray-logging.html#logging-directory-structure.
(raylet) - The agent is killed by the OS (e.g., out of memory).

有人可以告诉我这个问题的确切原因吗?

英文:

I am trying to install Modin on a shared computer which runs linux where I can get access to the terminal and jupyter. I created a virtual environment in Conda and used the steps mentioned in the official documentation for Modin. However when I tried to import Modin in the JupyterLab environment it is giving me these errors

#Executed Codeblock
import time
import modin.pandas as pd

import ray
ray.init(runtime_env={&#39;env_vars&#39;: {&#39;__MODIN_AUTOIMPORT_PANDAS__&#39;: &#39;1&#39;}})

Error :


2023-07-16 20:42:07,599	ERROR services.py:1169 -- Failed to start the dashboard , return code 1
2023-07-16 20:42:07,602	ERROR services.py:1194 -- Error should be written to &#39;dashboard.log&#39; or &#39;dashboard.err&#39;. We are printing the last 20 lines for you. See &#39;https://docs.ray.io/en/master/ray-observability/ray-logging.html#logging-directory-structure&#39; to find where the log file is.
2023-07-16 20:42:07,604	ERROR services.py:1238 -- 
The last 20 lines of /tmp/ray/session_2023-07-16_20-42-04_202116_30517/logs/dashboard.log (it contains the error message from the dashboard): 
  File &quot;/home/verma.shi/.conda/envs/large/lib/python3.9/site-packages/ray/dashboard/head.py&quot;, line 204, in _load_modules
    head_cls_list = dashboard_utils.get_all_modules(DashboardHeadModule)
  File &quot;/home/verma.shi/.conda/envs/large/lib/python3.9/site-packages/ray/dashboard/utils.py&quot;, line 121, in get_all_modules
    importlib.import_module(name)
  File &quot;/home/verma.shi/.conda/envs/large/lib/python3.9/importlib/__init__.py&quot;, line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1030, in _gcd_import
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1007, in _find_and_load
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 986, in _find_and_load_unlocked
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 680, in _load_unlocked
  File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 850, in exec_module
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 228, in _call_with_frames_removed
  File &quot;/home/verma.shi/.conda/envs/large/lib/python3.9/site-packages/ray/dashboard/modules/job/cli.py&quot;, line 14, in &lt;module&gt;
    from ray.job_submission import JobStatus, JobSubmissionClient
  File &quot;/home/verma.shi/.conda/envs/large/lib/python3.9/site-packages/ray/job_submission/__init__.py&quot;, line 2, in &lt;module&gt;
    from ray.dashboard.modules.job.pydantic_models import DriverInfo, JobDetails, JobType
  File &quot;/home/verma.shi/.conda/envs/large/lib/python3.9/site-packages/ray/dashboard/modules/job/pydantic_models.py&quot;, line 4, in &lt;module&gt;
    from pydantic import BaseModel, Field
ImportError: cannot import name &#39;Field&#39; from &#39;pydantic&#39; (/home/verma.shi/.conda/envs/large/lib/python3.9/site-packages/pydantic/__init__.py)
2023-07-16 20:42:07,753	INFO worker.py:1553 -- Started a local Ray instance.
Ray
Python version:	3.9.16
Ray version:	2.3.0
(raylet) [2023-07-16 20:42:09,476 E 31350 31408] (raylet) agent_manager.cc:135: The raylet exited immediately because the Ray agent failed. The raylet fate shares with the agent. This can happen because the Ray agent was unexpectedly killed or failed. Agent can fail when
(raylet) - The version of `grpcio` doesn&#39;t follow Ray&#39;s requirement. Agent can segfault with the incorrect `grpcio` version. Check the grpcio version `pip freeze | grep grpcio`.
(raylet) - The agent failed to start because of unexpected error or port conflict. Read the log `cat /tmp/ray/session_latest/dashboard_agent.log`. You can find the log file structure here https://docs.ray.io/en/master/ray-observability/ray-logging.html#logging-directory-structure.
(raylet) - The agent is killed by the OS (e.g., out of memory).

Can someone tell me what the exact issue for this is?

答案1

得分: 1

modin的版本在0.23.0之前与最新的pydantic 不兼容。请尝试以下操作:

  • 重新安装modin的最新版本,它应该要求pydantic<2,例如使用 pip install -U modin
  • 降级pydantic,如 pip install "pydantic&lt;2"
英文:

Versions of modin prior to 0.23.0 don't work with the latest pydantic. Try either:

  • reinstalling the latest version of modin, which should require pydantic<2, e.g. with pip install -U modin
  • downgrade pydantic, like pip install &quot;pydantic&lt;2&quot;

huangapple
  • 本文由 发表于 2023年7月17日 08:59:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/76700974.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定