Gensim 4.1 upgrade from 4.0.1

411 views
Skip to first unread message

Tedo Vrbanec

unread,
Sep 13, 2021, 1:49:48 PM9/13/21
to Gensim
As far as I am grateful for people who are creating Gensim and support it, I have to say that I always fear new versions, delaying upgrade to a newer version (like now), because very often a circus happens, and for me it is great stress.
So before upgrade, everything worked, after upgrade:

  File "/home/tedo/diagnose/diagnose.py", line 18, in <module>
    from gensim import corpora
  File "/usr/local/lib/python3.9/dist-packages/gensim/__init__.py", line 11, in <module>
    from gensim import parsing, corpora, matutils, interfaces, models, similarities, utils  # noqa:F401
  File "/usr/local/lib/python3.9/dist-packages/gensim/corpora/__init__.py", line 6, in <module>
    from .indexedcorpus import IndexedCorpus  # noqa:F401 must appear before the other classes
  File "/usr/local/lib/python3.9/dist-packages/gensim/corpora/indexedcorpus.py", line 14, in <module>
    from gensim import interfaces, utils
  File "/usr/local/lib/python3.9/dist-packages/gensim/interfaces.py", line 19, in <module>
    from gensim import utils, matutils
  File "/usr/local/lib/python3.9/dist-packages/gensim/matutils.py", line 1024, in <module>
    from gensim._matutils import logsumexp, mean_absolute_difference, dirichlet_expectation
  File "gensim/_matutils.pyx", line 1, in init gensim._matutils
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

Thanks for help in advance! :)

Tedo Vrbanec

unread,
Sep 13, 2021, 1:55:43 PM9/13/21
to Gensim
OK, I had to manually upgrade numpy, too.

Radim Řehůřek

unread,
Sep 14, 2021, 11:25:13 AM9/14/21
to Gensim
Yeah, this kerfuffle with numpy compatibility tripped up a lot of people (you can see more at https://github.com/RaRe-Technologies/gensim/issues/3226)

It should be fixed now, we just released Gensim 4.1.1 because of it:

Tedo, let us know if 4.1.1 fixes your issue.

Best,
Radim







Tedo Vrbanec

unread,
Sep 15, 2021, 12:16:16 PM9/15/21
to Gensim
Everything worked after I upgraded numpy.
With 4.1.1 version also works, too.
Thank you very much!
Reply all
Reply to author
Forward
0 new messages