无法安装 ray[tune] tune-sklearn

Unable to install ray[tune] tune-sklearn

我正在尝试在我的机器上安装 ray[tune] tune-sklearn,但总是失败。我正在使用装有 Big Sur 11.6 版和 Python 3.9.7(默认,2021 年 9 月 16 日,08:50:36)[Clang 10.0.0] :: Anaconda, Inc. on darwin 的 MacBook Pro 2019。除了这个以外,我尝试使用 conda install 或 pip install 安装的所有其他软件包都很好。我正在努力自己在网上找到答案。我当时使用的是 Python 3.8,但我删除了它并安装了 3.9,因为我认为这是问题所在。提前致歉,我是数据挖掘的新手,还不太了解。

我试过了

conda install -c conda-forge -y ray-tune tune-sklearn

但是得到了这个:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - ray-tune

Current channels:

  - https://conda.anaconda.org/conda-forge/osx-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/osx-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

我也试过了

pip install ray[tune] tune-sklearn

但是回来了

zsh: no matches found: ray[tune]

非常感谢任何帮助,谢谢。

更新:

我也试过了

pip install 'ray[tune]'

回来了

ERROR: Could not find a version that satisfies the requirement ray[tune] (from versions: none)
ERROR: No matching distribution found for ray[tune]

ray[tune]Ray distributed compute project that supports scalable hyperparameter tuning 中的一个库——不是 stand-alone Python 包。您应该能够使用正确的依赖项安装 ray

pip install "ray[tune]"

安装 Ray 后,您可以在 Python 项目中引用它,方法是:

import ray[tune]

from ray import tune