I trying to import gensim.
I have the following code
import gensim
model = gensim.models.Word2Vec.load_word2vec_format('./model/GoogleNews-
vectors-negative300.bin', binary=True)
I got the following error.
ImportError Traceback (most recent call
last)
<ipython-input-5-50007be813d4> in <module>()
----> 1 import gensim
2 model = gensim.models.Word2Vec.load_word2vec_format('./model
/GoogleNews-vectors-negative300.bin', binary=True)
ImportError: No module named 'gensim'
I installed gensim in python. I use genssim for word2vec.
Install gensim using:
pip install -U gensim
Or, if you have instead downloaded and unzipped the source tar.gz package, then run:
python setup.py test
python setup.py install