ImportError with gensim: cannot import name utils

If you encounter an error message similar to

gensim ImportError: cannot import name utils

then a likely reason is that there are conflicting copies of NumPy, SciPy, or utils. This is a common case for users of Canopy. A quick fix is as follows

pip uninstall numpy
pip uninstall scipy
pip uninstall utils

We then re-install gensim

pip install --upgrade gensim

Re-launch your analysis environment and you should have no problems with importing gensim.  Hopefully it helps!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s