安装Ray包,Python降版本

平常安装ray包使用的是:

1 pip install ray

然而今天在安装了新的Anaconda之后安装ray包提示:

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

参考了Ray的documentation:https://docs.ray.io/en/latest/ray-overview/installation.html,尝试了几个安装命令,都报同样的错误。

最后打算手动下载安装ray包的时候在网页中发现目前ray只适配到python3.10,3.11还在experimental版本。因此在虚拟环境中为python降版本:

conda search python # 显示可安装的python版本
conda install python=3.10 # 选择最新的能够安装ray的版本
conda activate <my_environment> # <my_environment> 处填写虚拟环境的名称 conda自动用新版本覆盖了旧版本

接着使用pip安装ray,安装成功。

 

posted @ 2024-04-03 18:08  惋奈  阅读(73)  评论(0编辑  收藏  举报