Python interface to Google word2vec
C Python Makefile
Switch branches/tags
Clone or download
fabmue and danielfrg Update (#47)
Python3: When reading stdout line by line from the subprocess, the overwriting character '\r' is not registered. Overwriting doesn't work in visualizing the training progress. 

This maybe not optimal as the error line can not be found by keyword 'ERROR:' as in the actual version.
Latest commit 0260a05 Jun 6, 2018


travis-ci appveyor

Python interface to Google word2vec.

Training is done using the original C, other functionality is pure python + numpy.


I recommend the Anaconda python distribution

pip install word2vec

Wheel: Wheels packages for OS X and Windows are provided on Pypi on a best effort sense. The code is quite easy to compile so consider using: --no-use-wheel on Linux and OS X.

Linux: There is no wheel support for linux so you have to compile the C code. The only requirement is gcc. You can override the compilation flags if needed: CFLAGS='-march=corei7' pip install word2vec

Windows: Very experimental support based this win32 port


The easiest way is to look at this example: word2vec

The default functionality from word2vec is also available from the command line as:

  • word2vec
  • word2phrase
  • word2vec-distance
  • word2vec-word-analogy
  • word2vec-compute-accuracy

Experimental functionality on doc2vec can be found in this other example: doc2vec