15

I am trying to use Gensim's Word2Vec implementation. Gensim warns that if you don't have a C compiler, the training will be 70% slower. Is there away to verify that Gensim is correctly using the C Compiler I have installed?

I am using Anaconda Python 3.5 on Windows 10.

David
  • 1,224
  • 10
  • 20
  • 1
    It helps a lot if you tell us what platform you're using, and what installer you used? – smci Oct 11 '16 at 23:14
  • Added info on the platform and installer, however I think I found the answer and it is platform and install independent (see my answer below). – David Oct 12 '16 at 02:58

2 Answers2

20

Apparently gensim offers a variable to detect this:

assert gensim.models.doc2vec.FAST_VERSION > -1

I found this line in this tutorial: https://github.com/RaRe-Technologies/gensim/blob/develop/docs/notebooks/doc2vec-IMDB.ipynb

David
  • 1,224
  • 10
  • 20
2

Gensim provides both wheels and an installer for Windows.

pip install gensim

should get you gensim with Cython optimization without the work of getting Cython up and running (not that it's not great to have Cython, but sometimes it's nice to just have stuff run).

cco
  • 5,873
  • 1
  • 16
  • 21