Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python pip: "error: legacy-install-failure"

Tags:

python

pip

gensim

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.
like image 393
Peyman Avatar asked Sep 02 '25 13:09

Peyman


2 Answers

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

like image 106
Roopa M Avatar answered Sep 05 '25 02:09

Roopa M


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

like image 26
Alexandr Zaitsev Avatar answered Sep 05 '25 01:09

Alexandr Zaitsev