So there is an import error with the latest version of gensim and there’s traffic around the question. I noticed that triu is now part of numpy, so it’s trivially easy to fix this problem without a downgrade. Is that a bad practice?
In <python-install>/site-packages/gensim/matutils.py
(or your equivalent path to the gensim install), line 21 imports triu from scipy.linalg. I literally removed this import and added one line such that the imports now look like:
from numpy import triu
from scipy.linalg import get_blas_funcs
And everything works fine for me. Any reason not to use this? Since I don’t have enough rep to actually answer other similar questions, you guys can throw rocks and tell me why that’s bad. Thanks!
I changed the source code as explained above and now the package works fine for me! Maybe it’s bad practice though.
Kris Ezra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.