'python pip: "error: legacy-install-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.


Solution 1:[1]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Roopa M