在conda env中使用wheel安装ray

问题描述

我正在使用轮子安装 ray。在 conda yml 文件中,在我指定的依赖项下

  - ray-1.4.0-cp37-cp37m-manylinux2014_x86_64.whl

conda env createsource activate ... 工作正常。当我尝试导入 ray 时,我收到以下消息

/home/.../.conda/envs/py373/lib/python3.7/site-packages/ray/autoscaler/_private/cli_logger.py:61: FutureWarning: Not all Ray CLI dependencies were found. In Ray 1.4+,the Ray CLI,autoscaler,and dashboard will only be usable via `pip install 'ray[default]'`. Please update your install command.
  "update your install command.",FutureWarning)

我应该如何更新我的安装命令?

解决方法

一些想法:

  1. conda-forge 上有一个名为 ray-core 的 conda 包。见here。该版本目前为 1.4.0,因此您可以简单地将 conda-forge 添加到您的频道,然后指定 ray-core 以获取射线。我刚刚对其进行了测试,conda 设法正确安装了所有依赖项。

  2. 更深入地查看错误,似乎 ray 试图在该部分代码中导入 colorful 模块,请参阅 here。这也可以从 conda-forge 获得,所以如果你想严格坚持使用 whl 文件,我建议将 colorful 模块添加到你的 yml 文件中