无法通过 pip 在 Windows 10 上安装 spacy 包

数据挖掘 机器学习 深度学习 斯派西 视窗
2022-03-03 20:20:47

我有以下环境。操作系统:Windows 10 Python:Python 3.7.4 PIP:pip 19.3.1

我正在尝试在我的 Windows 10 操作系统中安装 spacy。它给了我以下错误。

 ERROR: Command errored out with exit status 1:
   command: 'd:\rajesh\python\env1\scripts\python.exe' 'd:\rajesh\python\env1\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\rajesh.das\AppData\Local\Temp\pip-build-env-vna552d_\normal' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'thinc<7.4.0,>=7.3.0' 'cymem<2.1.0,>=2.0.2' 'preshed<3.1.0,>=3.0.2' wheel 'cython>=0.25' 'murmurhash<1.1.0,>=0.28.0'
       cwd: None
  Complete output (460 lines):
  Collecting thinc<7.4.0,>=7.3.0
    Using cached https://files.pythonhosted.org/packages/d4/38/f79bb496ced36f8d69cdbdfe57a322205582ed9508bda5bd0227969d5a77/thinc-7.3.1.tar.gz
  Collecting cymem<2.1.0,>=2.0.2
    Using cached https://files.pythonhosted.org/packages/ce/8d/d095bbb109a004351c85c83bc853782fc27692693b305dd7b170c36a1262/cymem-2.0.3.tar.gz
  Collecting preshed<3.1.0,>=3.0.2
    Using cached https://files.pythonhosted.org/packages/5f/14/de231123ddbe0bf12bd9b1993122d67f22859643bee4dad3b6ce91986336/preshed-3.0.2.tar.gz
  Collecting wheel
    Using cached https://files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl
  Collecting cython>=0.25
    Using cached https://files.pythonhosted.org/packages/6d/da/b48f8a1778a82d24d1c3a543d9db8461374f0c70c0145f0b5a8664dbc122/Cython-0.29.14-cp37-cp37m-win32.whl
  Collecting murmurhash<1.1.0,>=0.28.0
    Using cached https://files.pythonhosted.org/packages/22/e9/411be1845f1ac07ae3bc40a4b19ba401819baed4fa63b4f5ef28b2300eb4/murmurhash-1.0.2.tar.gz
  Collecting blis<0.5.0,>=0.4.0
    Using cached https://files.pythonhosted.org/packages/98/5a/f9b8a78e3d1fdde1b0215413d88ab55d907ab81f95b62418a6e9cda30dec/blis-0.4.1.tar.gz
  Collecting wasabi<1.1.0,>=0.0.9
    Using cached https://files.pythonhosted.org/packages/ff/ef/e8266e158ed32bf5f723fac862b6518833d0b53ca183165a8718f212c0d5/wasabi-0.4.2-py3-none-any.whl
  Collecting srsly<1.1.0,>=0.0.6
    Using cached https://files.pythonhosted.org/packages/1e/5b/f83e478fbf44c0d04f182e56db0871a53f5096febb8eb0be7cec75dca73b/srsly-0.2.0.tar.gz
  Collecting numpy>=1.7.0
    Using cached https://files.pythonhosted.org/packages/ce/ad/2e88f36b56f64f70c081b32fa5512dacedf12005ccb0c2d300d44dcc1215/numpy-1.17.4-cp37-cp37m-win32.whl
  Collecting plac<1.2.0,>=0.9.6
    Using cached https://files.pythonhosted.org/packages/86/85/40b8f66c2dd8f4fd9f09d59b22720cffecf1331e788b8a0cab5bafb353d1/plac-1.1.3-py2.py3-none-any.whl
  Collecting tqdm<5.0.0,>=4.10.0
    Using cached https://files.pythonhosted.org/packages/7f/32/5144caf0478b1f26bd9d97f510a47336cf4ac0f96c6bc3b5af20d4173920/tqdm-4.40.2-py2.py3-none-any.whl
  Building wheels for collected packages: thinc, cymem, preshed, murmurhash, blis, srsly
    Building wheel for thinc (setup.py): started
    Building wheel for thinc (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:

另外我试图安装 spacy 的依赖包thinc,它也给出了同样的错误。

任何人都可以给出一些想法吗?

1个回答

我在尝试将 spaCy 安装到 32 位 Python 虚拟环境时遇到了同样的错误。我尝试安装的最新版本的 spaCy (2.3.2) 需要 64 位 Python。当我将我的虚拟环境重建为 64 位并尝试安装 spaCy 时,它运行良好。

只要确保您尝试将 spaCy 安装到 64 位 Python 环境中,您就可以开始使用了。