Recommended version of numpy with gensim? (numpy 2.x breaks it.)

130 views
Skip to first unread message

Dimitar Kazakov

unread,
Mar 25, 2025, 6:34:06 PMMar 25
to Gensim
Hi,
not sure if my previous post is awaiting approval or I did not submit it - apologies if it's the former. I am trying to run gensim (Word2Vec) on Google Colab and it clashes with the default numpy version, which is 2.0. Can you recommend which version of numpy should gensim be used with for a maximum compatibility?

Many thanks,

Dimitar Kazakov, U. of York

Gordon Mohr

unread,
Mar 25, 2025, 6:54:54 PMMar 25
to Gensim
Per my other message: you shouldn't have to pre-install a specific version - you can go with whatever `numpy` (& `scipy`) that 'pip' itself pulls in to match the Gensim install's specifications.

In my most recent test, those seemed to be `numpy-1.26.4 scipy-1.13.1` – but if other maintenance micro releases come out, & `pip` installs them in accordance with the Gensim stated dependencies avoiding more advanced versions, those should be fine too.

On environments where `numpy` 2+ is already installed, that involves a downgrade - as Gensim hasn't yet been updated to work with `numpy` 2+ & it's not yet clear when such changes might be possible. As far as I know, no one has scoped the effort required or scheduled the work – see <https://github.com/piskvorky/gensim/issues/3560>.

- Gordon
Reply all
Reply to author
Forward
0 new messages