Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making Gensim FAST_VERSION work on Windows 10 (Python 3.6)

I am running Gensim with Python 3.6 on Windows 10. I have tried installing Visual Studio 2019 and MinGW (through TDM-GCC). I have uninstalled and reinstalled Gensim after both installations. I also did that after uninstalling and reinstalling Cython.

Regardless, it's not able to run the C extension, so I am stuck with the slower Numpy code.

I am not sure where the trouble lies, and I have run out of ideas on how to proceed. What can I do to make progress?

like image 765
Avatrin Avatar asked May 25 '26 22:05

Avatrin


1 Answers

If you have the option of using a Linux/UNIX-based OS, much of the Python/scientific stack is going to be easier to get working there, as the bulk of development, testing, and use happens on non-Windows OSes.

Using a package manager that's well-maintained for Windows OSes, like conda, may succeed in installing highly-optimized versions of gensim (& other packages), where default instructions & local tinkering does not. In some cases, this may be because it is able to use trusted, pre-compiled binaries/libraries.

In some cases, pre-compiled Python "Wheel" (.whl) packages may help. I can't vouch for these, but there appear to be a set of these at:

https://www.lfd.uci.edu/~gohlke/pythonlibs/#gensim

(This other SO answer, which I also can't vouch for, may help guid a wheels-based installation.)

If you absolutely need to build locally, for example because you are customizing gensim's optimized code, debugging the issue would require paying close attention to the individual errors reported during installation and researching/addressing each one-by-one.

like image 110
gojomo Avatar answered May 27 '26 19:05

gojomo