ModuleNotFoundError: No module named 'gensim' on Jupyter - Using Anaconda with python 3

3,035 views
Skip to first unread message

Denis Candido

unread,
Oct 24, 2017, 12:29:04 PM10/24/17
to gensim
Hello,

I'm receiving this exception but I'm doing everything corretly. If I run a python script it imports successfully, but can't import using jupyter.... Any idea?

It is being listed on 'conda list'. Already tried installing it via 'pip3 install gensim' but the exception persists.

BR,
Denis.

Ivan Menshikh

unread,
Oct 25, 2017, 4:28:03 AM10/25/17
to gensim
Hi Denis,

Maybe you jupyter use different python (different virtual environment), check it and install gensim to needed environment.

Martin

unread,
Oct 26, 2017, 2:12:02 PM10/26/17
to gensim
I got exactly the same issue. I installed both python 3.6.3 in my anaconda "my_env" environment. I can import gensim in python terminal, but not in iPython. 

(my_env) martin@nlpparser:~$ ipython
Python 3.6.3 |Anaconda, Inc.| (default, Oct 13 2017, 12:02:49)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import gensim
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-ec15f3ffe0f1> in <module>()
----> 1 import gensim

ModuleNotFoundError: No module named 'gensim'


In contrast to this output successfully:
(my_env) martin@nlpparser:~$ python
Python 3.6.3 |Anaconda, Inc.| (default, Oct 13 2017, 12:02:49)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gensim
>>>

Ivan Menshikh

unread,
Oct 27, 2017, 6:54:47 AM10/27/17
to gensim
Unfortunately, I don't know what's a reason, you should try to re-install ipython.

Radim Řehůřek

unread,
Oct 27, 2017, 1:30:51 PM10/27/17
to gensim
Hi Martin,

this sounds more like an Anaconda issue than a Gensim issue.

You might have better luck getting support at their mailing list / support forum.

Best,
Radim
Reply all
Reply to author
Forward
0 new messages