我想使用spacy 2.3.5版本,因为我在这个版本中训练了一个NLP模型. 我能够安装最新的spacy使用"pip安装spacy"
However installing any specific version fails个
>>pip install spacy==2.3.5个
copying spacy\tests\tokenizer\sun.txt -> build\lib.win-amd64-cpython-310\spacy\tests\tokenizer
running build_ext
building 'spacy.parts_of_speech' 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 spacy Failed to build spacy ERROR: Could not build wheels for spacy, which is required to install pyproject.toml-based projects
Build tools exists in my system:
我曾多次try 重新安装pip、构建工具并重新启动我的系统.我的环境变量路径中不存在构建工具,因此我添加了该路径,但Spacy安装失败.
如果这看起来像一个重复的问题,我很抱歉,但我已经判断了Stackoverflow的解决方案,但都不起作用.
This answer建议安装third part wheels,但网页不可用.
My environment info: Python 3.10.10上的虚拟环境 Windows 10家庭版