无法在 ARM 上安装 spacy

can not install spacy on ARM

如何在 ARM 处理器上安装 spacy?我得到一个错误

ERROR: Command errored out with exit status 1:
   command: /root/miniforge3/bin/python3.7 /root/miniforge3/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-ahxo0t0p/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.25' 'cymem>=2.0.2,<2.1.0' 'preshed>=3.0.2,<3.1.0' 'murmurhash>=0.28.0,<1.1.0' thinc==7.4.1

完整错误日志:

https://gist.github.com/shantanuo/1fb62b83a54713e517307c9cad9624f5

它似乎试图针对 x86_64 进行编译。至少在您链接到的输出中有很多参考。例如 gcc: error: unrecognized command line option ‘-mavx2’(AVX2 是 x86 扩展)。还包含指向 x86_64 的路径。我怀疑你在这里编译的东西是否真的支持 ARM。

您必须指定一些额外的设置来为正确的体系结构编译依赖项 blis。最基本的尝试选项是:

BLIS_ARCH="generic" pip install spacy --no-binary blis

有关更多详细信息和特定于体系结构的选项,请参阅:https://github.com/explosion/cython-blis#building-blis-for-alternative-architectures