[英]Cannot install spacy in pycharm
我試過無數次安裝 spaCy。 起初我收到一個錯誤,指出需要將 C++ 升級到版本 14。現在我收到以下一些錯誤,這似乎表明整個軟件包的安裝部分存在許多錯誤。
我已經這樣做了,現在我得到了單獨的錯誤。 以下是整個錯誤:
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.```
雖然不確定,但您可以嘗試以下步驟:
從 PyCharm 菜單中打開
File > Settings > Project
。
選擇您當前的項目。
單擊項目選項卡中的
Python Interpreter
選項卡。
單擊小
+
符號將新庫添加到項目中。
現在輸入要安裝的庫,在您的示例中不帶引號的
"spacy"
,然后單擊Install Package
。
等待安裝終止並關閉所有彈出窗口
您也可以查看鏈接。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.