To Solve error: legacy-install-failure Then, Upgrade your wheel with this Commandline pip install --upgrade wheel Now, Try to Upgrade your setuptools with this commandline pip install --upgrade setuptools Now, Try to install gensim again with this command: pip install gensim OR pip3 install gensim. Hope Now, Your error must be solved.