在 linux 上的 anaconda 虚拟环境中下载 spacy ray

问题描述

我正在尝试为 spacy v3.0 下载 spacy ray。我想在我有 spacy v3.0 和其他依赖项的 conda 虚拟环境中执行此操作。我不知道如何下载它。我试过 conda install spacy-rayconda install -c conda-forge spacy-ray。这些说没有找到这样的模块。然后我放弃并尝试 pip install spacy-ray 但这给了我以下消息:

ERROR: Cannot install spacy-ray==0.0.0,spacy-ray==0.1.0 and spacy-ray==0.1.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    spacy-ray 0.1.1 depends on ray<1.0.0 and >=0.8
    spacy-ray 0.1.0 depends on ray<1.0.0 and >=0.8
    spacy-ray 0.0.0 depends on ray<1.0.0 and >=0.8

To fix this you Could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

conda install -c conda-forge spacy[ray] 安装了一个叫做 openssl 的东西。虽然没有 spacy ray。

我也尝试过:(我的环境处于活动状态):

conda install git pip

pip install git+git://github.com/explosion/spacy-ray.git@master

它说:

ERROR: Could not find a version that satisfies the requirement ray<1.0.0,>=0.8 (from spacy-ray)
ERROR: No matching distribution found for ray<1.0.0,>=0.8

我该如何正确执行此操作?

解决方法

这似乎是 PyPi 和 Ray 项目 https://github.com/ray-project/ray/issues/5444 或 Anaconda 环境中的 Python 3.7.4 二进制文件的已知问题 https://github.com/ContinuumIO/anaconda-issues/issues/11195#issuecomment-521052981

该问题已关闭并声明已修复,但我设法使用 Python 3.7.4 重现了您的问题

解决方案建议改用 Python 3.7.3。

conda create -n ray python=3.7.3

pip install -U spacy-ray 应该在 Python 3.7.3 环境中工作。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...