Reputation: 169
I have installed Anacoda Python v2.7 and Gensim v 0.13.0
I am using Spyder as IDE
I have the following simple code:
from gensim import corpora
I got the following error:
from gensim import corpora
File "gensim.py", line 7, in <module>
ImportError: cannot import name corpora
I reinstalled: - Gensim - Scipy - Numpy but still have the same issue.
Upvotes: 5
Views: 10152
Reputation: 21
My issue got resolved by uninstalling then reinstalling gensim using pip then upgrading it
pip uninstall gensim
pip install gensim
pip install --upgrade gensim
Upvotes: 0
Reputation: 399
I had the same problem, when I named my own script "gensim.py". It was trying to load the modules from itself when importing from gensym.
So, avoid using "gensim.py" as a name of your script.
Upvotes: 17