简体   繁体   English

无法在pycharm中安装spacy

[英]Cannot install spacy in pycharm

I've tried installing spaCy numerous times.我试过无数次安装 spaCy。 At first I was getting an error noting that C++ needed to be upgraded to version 14. Now I'm getting a number of errors below that seem to indicate that there are numerous errors with portions of the install throughout the package.起初我收到一个错误,指出需要将 C++ 升级到版本 14。现在我收到以下一些错误,这似乎表明整个软件包的安装部分存在许多错误。

I've since done that and now I'm getting separate errors.我已经这样做了,现在我得到了单独的错误。 Below is the entire error:以下是整个错误:

  Using cached spacy-3.3.0.tar.gz (1.1 MB)
  Installing build dependencies: started
  Installing build dependencies: still running...
  Installing build dependencies: finished with status 'error'

  error: subprocess-exited-with-error
  
  pip subprocess to install build dependencies did not run successfully.
  exit code: 1
  
  [130 lines of output]
  Collecting setuptools
    Using cached setuptools-62.1.0-py3-none-any.whl (1.1 MB)
  Collecting cython<3.0,>=0.25
    Using cached Cython-0.29.28-py2.py3-none-any.whl (983 kB)
  Collecting cymem<2.1.0,>=2.0.2
    Using cached cymem-2.0.6.tar.gz (8.2 kB)
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
    Installing backend dependencies: started
    Installing backend dependencies: finished with status 'done'
    Preparing metadata (pyproject.toml): started
    Preparing metadata (pyproject.toml): finished with status 'done'
  Collecting preshed<3.1.0,>=3.0.2
    Using cached preshed-3.0.6.tar.gz (14 kB)
    Installing build dependencies: started
    Installing build dependencies: still running...
    Installing build dependencies: finished with status 'error'
    error: subprocess-exited-with-error
  
    pip subprocess to install build dependencies did not run successfully.
    exit code: 1
  
    [94 lines of output]
    Collecting setuptools
      Using cached setuptools-62.1.0-py3-none-any.whl (1.1 MB)
    Collecting cython>=0.28
      Using cached Cython-0.29.28-py2.py3-none-any.whl (983 kB)
    Collecting cymem<2.1.0,>=2.0.2
      Using cached cymem-2.0.6.tar.gz (8.2 kB)
      Installing build dependencies: started
      Installing build dependencies: finished with status 'done'
      Getting requirements to build wheel: started
      Getting requirements to build wheel: finished with status 'done'
      Installing backend dependencies: started
      Installing backend dependencies: finished with status 'done'
      Preparing metadata (pyproject.toml): started
      Preparing metadata (pyproject.toml): finished with status 'done'
    Collecting murmurhash<1.1.0,>=0.28.0
      Using cached murmurhash-1.0.7.tar.gz (12 kB)
      Installing build dependencies: started
      Installing build dependencies: finished with status 'done'
      Getting requirements to build wheel: started
      Getting requirements to build wheel: finished with status 'done'
      Installing backend dependencies: started
      Installing backend dependencies: finished with status 'done'
      Preparing metadata (pyproject.toml): started
      Preparing metadata (pyproject.toml): finished with status 'done'
    Building wheels for collected packages: cymem, murmurhash
      Building wheel for cymem (pyproject.toml): started
      Building wheel for cymem (pyproject.toml): finished with status 'error'
      error: subprocess-exited-with-error
  
      Building wheel for cymem (pyproject.toml) did not run successfully.
      exit code: 1
  
      [19 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win32-cpython-38
      creating build\lib.win32-cpython-38\cymem
      copying cymem\about.py -> build\lib.win32-cpython-38\cymem
      copying cymem\__init__.py -> build\lib.win32-cpython-38\cymem
      package init file 'cymem\tests\__init__.py' not found (or not a regular file)
      creating build\lib.win32-cpython-38\cymem\tests
      copying cymem\tests\test_import.py -> build\lib.win32-cpython-38\cymem\tests
      copying cymem\cymem.pyx -> build\lib.win32-cpython-38\cymem
      copying cymem\cymem.pxd -> build\lib.win32-cpython-38\cymem
      copying cymem\__init__.pxd -> build\lib.win32-cpython-38\cymem
      warning: build_py: byte-compiling is disabled, skipping.
  
      running build_ext
      building 'cymem.cymem' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build T: enter code here`https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]
  
      note: This error originates from a subprocess, and is likely not a problem with pip.
      ERROR: Failed building wheel for cymem
      Building wheel for murmurhash (pyproject.toml): started
      Building wheel for murmurhash (pyproject.toml): finished with status 'error'
      error: subprocess-exited-with-error
  
      Building wheel for murmurhash (pyproject.toml) did not run successfully.
      exit code: 1
  
      [24 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win32-cpython-38
      creating build\lib.win32-cpython-38\murmurhash
      copying murmurhash\about.py -> build\lib.win32-cpython-38\murmurhash
      copying murmurhash\__init__.py -> build\lib.win32-cpython-38\murmurhash
      creating build\lib.win32-cpython-38\murmurhash\tests
      copying murmurhash\tests\test_against_mmh3.py -> build\lib.win32-cpython-38\murmurhash\tests
      copying murmurhash\tests\test_import.py -> build\lib.win32-cpython-38\murmurhash\tests
      copying murmurhash\tests\__init__.py -> build\lib.win32-cpython-38\murmurhash\tests
      copying murmurhash\mrmr.pyx -> build\lib.win32-cpython-38\murmurhash
      copying murmurhash\mrmr.pxd -> build\lib.win32-cpython-38\murmurhash
      copying murmurhash\__init__.pxd -> build\lib.win32-cpython-38\murmurhash
      creating build\lib.win32-cpython-38\murmurhash\include
      creating build\lib.win32-cpython-38\murmurhash\include\murmurhash
      copying murmurhash\include\murmurhash\MurmurHash2.h -> build\lib.win32-cpython-38\murmurhash\include\murmurhash
      copying murmurhash\include\murmurhash\MurmurHash3.h -> build\lib.win32-cpython-38\murmurhash\include\murmurhash
      warning: build_py: byte-compiling is disabled, skipping.
  
      running build_ext
      building 'murmurhash.mrmr' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]
  
      note: This error originates from a subprocess, and is likely not a problem with pip.
      ERROR: Failed building wheel for murmurhash
    Failed to build cymem murmurhash
    ERROR: Could not build wheels for cymem, murmurhash, which is required to install pyproject.toml-based projects
    [end of output]
  
    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: subprocess-exited-with-error
  
  pip subprocess to install build dependencies did not run successfully.
  exit code: 1
  
  See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

pip subprocess to install build dependencies did not run successfully.
exit code: 1

See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.```

Although not sure , you could try this steps :虽然不确定,但您可以尝试以下步骤:

Open File > Settings > Project from the PyCharm menu.从 PyCharm 菜单中打开File > Settings > Project

Select your current project.选择您当前的项目。

Click the Python Interpreter tab within your project tab.单击项目选项卡中的Python Interpreter选项卡。

Click the small + symbol to add a new library to the project.单击小+符号将新库添加到项目中。

Now type in the library to be installed, in your example "spacy" without quotes, and click Install Package .现在输入要安装的库,在您的示例中不带引号的"spacy" ,然后单击Install Package

Wait for the installation to terminate and close all popup windows等待安装终止并关闭所有弹出窗口

you can also check the link .您也可以查看链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM