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.
Code dependencies Gensim runs on Linux, Windows and Mac OS X, and should run on any other platform that supports Python 3.6+ and NumPy. Gensim depends on the following software: Python, tested with versions 3.6, 3.7 and 3.8.
It is designed to extract semantic topics from documents. It can handle large text collections. Hence it makes it different from other machine learning software packages which target memory processing. Gensim also provides efficient multicore implementations for various algorithms to increase processing speed.
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
If using Python3 be sure to use pip3 instead of pip for installing gensim.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With