python pip:“错误:遗留安装失败”

Pey*_*man 30 python pip gensim

我想gensim通过安装 python 包pip install gensim

\n

但是发生了这个错误,我不知道应该做什么来解决它。

\n
      running build_ext\n      building 'gensim.models.word2vec_inner' extension\n      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/\n      [end of output]\n\n  note: This error originates from a subprocess, and is likely not a problem with pip.\nerror: legacy-install-failure\n\n\xc3\x97 Encountered error while trying to install package.\n\xe2\x95\xb0\xe2\x94\x80> gensim\n\nnote: This is an issue with the package mentioned above, not pip.\nhint: See above for output from the failure.\n
Run Code Online (Sandbox Code Playgroud)\n

小智 11

如果您无法安装插件,
\n您可以从其他存储库下载它,例如:\n存储库取决于 python 和系统的版本。

\n

例如:对于 Windows 11(x64) 和 python 3.10,您应该使用以下文件:gensim\xe2\x80\x914.1.2\xe2\x80\x91cp310\xe2\x80\x91cp310\xe2\x80\x91win_amd64.whl

\n