python pip: “错误:legacy-install-failure”

发布于 2025-01-10 13:06:04 字数 692 浏览 1 评论 0原文

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

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

      running build_ext
      building 'gensim.models.word2vec_inner' 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: legacy-install-failure

× Encountered error while trying to install package.
╰─> gensim

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

I want to install gensim python package via pip install gensim

But this error occurs and I have no idea what should I do to solve it.

      running build_ext
      building 'gensim.models.word2vec_inner' 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: legacy-install-failure

× Encountered error while trying to install package.
╰─> gensim

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

淡墨 2025-01-17 13:06:04

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

例如:对于 Windows 11(x64) 和 python 3.10,您应该使用以下文件:gensim-4.1.2-cp310-cp310-win_amd64.whl

If you fail to install plugins,
you can download it from other repositories like this one:
repository depends on the version of python and the system.

for example: for windows 11(x64) and python 3.10 you should take this file: gensim‑4.1.2‑cp310‑cp310‑win_amd64.whl

涙—继续流 2025-01-17 13:06:04

我在安装惊喜时遇到了类似的问题。
请从此处下载构建工具 https://visualstudio.microsoft.com/visual-cpp -构建工具/
然后从这里安装一些东西,只需勾选这里的框

i had a similar issue with installing surprise.
Please download build tools from here https://visualstudio.microsoft.com/visual-cpp-build-tools/
Then install some things from here, just tick the box like here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文